/usr/share/fish/functions/dirs.fish is in fish-common 2.4.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | function dirs --description 'Print directory stack'
# process options
if count $argv >/dev/null
switch $argv[1]
case -c
# clear directory stack
set -e -g dirstack
return 0
end
end
# replace $HOME with ~
echo -n (echo (command pwd) | sed -e "s|^$HOME|~|")" "
for i in $dirstack
echo -n (echo $i | sed -e "s|^$HOME|~|")" "
end
echo
end
|