mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-02 22:21:15 -03:00
Fix pushd completions in the -n case
This commit is contained in:
@@ -10,8 +10,9 @@ end
|
||||
function __fish_complete_pushd_minus
|
||||
if count $dirstack > /dev/null
|
||||
# print each member of the stack, replace $HOME with ~
|
||||
# Negative arguments are expected to start at "-0"
|
||||
for i in (seq (count $dirstack) -1 1)
|
||||
printf "-%s\t%s\n" $i "Rotate to "(string replace -r "^$HOME" "~" -- $dirstack[$i])
|
||||
printf "%s\t%s\n" -(math $i - 1) "Rotate to "(string replace -r "^$HOME" "~" -- $dirstack[(math -$i)])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user