Fix dirs returns false when $dirstack is empty

This commit is contained in:
Andrew Schulman 2021-08-06 16:52:59 -04:00 committed by Fabian Homborg
parent 60a9dcbf05
commit afef67b4e8

View File

@ -16,4 +16,5 @@ function dirs --description 'Print directory stack'
# Replace $HOME with ~. # Replace $HOME with ~.
string replace -r '^'"$HOME"'($|/)' '~$1' -- $PWD $dirstack | string join " " string replace -r '^'"$HOME"'($|/)' '~$1' -- $PWD $dirstack | string join " "
return 0
end end