Hi
I'm using fish-shell 2.7.1 on LinuxMint 18.3 (64 bit) (4.13.0-37-generic).
I used the following function to list files after changing directory.
function cd
if count $argv > /dev/null
builtin cd "$argv"; and ls
else
builtin cd ~; and ls
end
end
By the function, I was able to display file list on current directory. But commands dirh, prevd, and nextd did not work as usual.
I checked this function by turning it on and off, and it seemed that it was caused by builtin cd. Below is the result of builtin cd to dirh.
Normal cd
$ cd /tmp
$ mkdir a b
$ dirh
1) /home/mumeiyamibito
/tmp
$ cd a
$ dirh
2) /home/mumeiyamibito
1) /tmp
/tmp/a
$ cd ../b
$ dirh
3) /home/mumeiyamibito
2) /tmp
1) /tmp/a
/tmp/b
builtin cd
$ cd /tmp
$ dirh
1) /home/mumeiyamibito
/tmp
$ builtin cd a
$ dirh
1) /home/mumeiyamibito
/tmp/a
$ builtin cd ../b
$ dirh
1) /home/mumeiyamibito
/tmp/b
How can I resolve this problem?
Thanks.
Hi
I'm using fish-shell 2.7.1 on LinuxMint 18.3 (64 bit) (4.13.0-37-generic).
I used the following function to list files after changing directory.
By the function, I was able to display file list on current directory. But commands
dirh,prevd, andnextddid not work as usual.I checked this function by turning it on and off, and it seemed that it was caused by
builtin cd. Below is the result ofbuiltin cdtodirh.Normal cd
builtin cd
How can I resolve this problem?
Thanks.