在我的系統之一,bash的可編程完成工程基本命令是這樣的:如何爲命令行開關啓用Bash可編程完成?
$ ls -l t/
01_createTicket/ 02_methods.t
[etc...]
但是,它並沒有爲交換機在我的自定義命令的工作:
$ ./test_all.pl --environment=test --verbosity=1 --test=t/
[will not autocomplete; does not show contents of directory]
在所有我的其他系統,第二個例子起作用。
我需要在我的系統上做些什麼調整才能在這樣的長命令結束時啓用bash完成?
「one」和「all other」系統有什麼區別?首先查找bash版本,'.bashrc'內容和'set'選項的差異。 **另外**在每臺機器上運行'complete -p'並比較,看看有什麼不同。 – cxw
$:bash --version,GNU bash,版本4.2.46(1) - 釋放(x86_64-redhat-linux-gnu)在所有系統上。我的非工作系統有一堆完整的輸出-p,我的工作系統不會爲該命令提供任何輸出。 – Marcus
嘗試在非工作系統上運行'complete -r'以使其與正在工作的系統匹配(每[this](https://blog.onetechnical.com/2012/06/19/disable-bash-autocompletion-on -ubunt /)) – cxw