In Programmable Completion Builtins complete command, there is a -I argument. It said:
The -I option indicates that other supplied options and actions should apply to completion on the initial non-assignment word on the line, or after a command delimiter such as ‘;’ or ‘|’, which is usually command name completion.
I don't understand "the initial non-assignment word on the line" , can someone give an example.
I set a complete by complete -W 'AA BB' -I
, It worked "after a command delimiter"
root@aliecs:~# complete -W 'AA BB' -I
root@aliecs:~# ls &&<tab><tab>
AA BB
root@aliecs:~# ls ;<tab><tab>
AA BB
root@aliecs:~# ls |<tab><tab>
AA BB
root@aliecs:~# ls ||<tab><tab>
AA BB
I want an example of "the initial non-assignment word on the line"