bash-completion
bash-completion copied to clipboard
feat(_filedir): add `-f` to manually suffix / to directory names
This attempts to implement _filedir -C as discussed in #827.
Obsoleted by https://github.com/scop/bash-completion/pull/973
Let me reopen this. The problem that the suffix slash is not added to directory names for the paths generated in another directory is not solved.
Also, I'd like to use the feature to suffix slashes to directory names to use it in another PR. There are many cases where the suffix slash is not added because the generated word does not exactly match a directory name in the current directory. In addition to the cases we change the directory, this also happens when the generated words are suffixed by xxx,yyy,, @, etc.
Rebased and added a fix. Now -C dir is not needed because it is supported by _comp_compgen, but I'd like to have another flag
-f to instruct _filedir that a slash needs to be manually suffixed to directory names.