Am Sa., 22. Apr. 2023 um 21:26 Uhr schrieb Bruno Haible <br...@clisp.org>: > Amin Chaloukh wrote: > > I have found when you use the command in this format patch [original file > > [patchfile]] it does not find the patchfile with the autocompletion > > Completions are — assuming you use GNU bash — part of the 'bash-completion' > package. For example, the completions for the 'patch' are coded in > /usr/share/bash-completion/completions/patch . > Its homepage is at https://github.com/scop/bash-completion . You can > file an issue there.
Thanks, Bruno. The bash completion rules support the "patch file patch" syntax for patch files matching *.patch, *.dif, *.diff (and even x.dpatch, which seems a bit odd): case $args in 1) _filedir ;; 2) _filedir '@(?(d)patch|dif?(f))' ;; esac Andreas