We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4ede51 commit 61982cbCopy full SHA for 61982cb
bash_completion
@@ -2548,8 +2548,12 @@ __load_completion()
2548
dirs+=(./completions)
2549
fi
2550
2551
- # 3) From bin directories extracted from path to command, and $PATH
2552
- [[ $cmd == */* ]] && paths=("${cmd%/*}") || paths=()
+ # 3) From bin directories extracted from the specified path to the command,
+ # the real path to the command, and $PATH
2553
+ paths=()
2554
+ [[ $cmd == */* ]] && paths+=("${cmd%/*}")
2555
+ local ret
2556
+ _comp_realcommand "$cmd" && paths+=("${ret%/*}")
2557
_comp_split -aF : paths "$PATH"
2558
for dir in "${paths[@]%/}"; do
2559
[[ $dir == ?*/@(bin|sbin) ]] &&
0 commit comments