oh-my-fish / plugin-cd

A featured cd can make your fish journey much more pleasant.
https://github.com/sancoder-q/plugin-cd
MIT License
19 stars 5 forks source link

Can't use dirh, prevd and nextd #6

Closed wataash closed 6 years ago

wataash commented 6 years ago

Procedure:

$ sh -c 'env HOME=$(mktemp -d) fish'
Welcome to fish, the friendly interactive shell
wsh@wsh9b /h/wsh> # -----------------------------------------------------------
wsh@wsh9b /h/wsh> # Before install cd, dirh works fine.
wsh@wsh9b /h/wsh> cd /
wsh@wsh9b /> dirh
 1) /home/wsh
    /

wsh@wsh9b /> prevd
wsh@wsh9b /h/wsh> dirh
    /home/wsh
 1) /

wsh@wsh9b /h/wsh> # -----------------------------------------------------------
wsh@wsh9b /h/wsh> # Install omf
wsh@wsh9b /h/wsh> curl -L https://get.oh-my.fish > install
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   194  100   194    0     0    194      0  0:00:01  0:00:01 --:--:--   155
100 18962  100 18962    0     0  18962      0  0:00:01  0:00:01 --:--:-- 18962
wsh@wsh9b /h/wsh> fish install --path=~/.local/share/omf --config=~/.config/omf
install (line 140): function: Invalid process id '%self'
function on_exit -p %self
^
Checking for a sane environment...
Installing Oh My Fish to /tmp/tmp.tZyJkMBOXd/.local/share/omf...
Using release channel "stable".
Cloning master from https://github.com/oh-my-fish/oh-my-fish.git...
Writing bootstrap to /tmp/tmp.tZyJkMBOXd/.config/fish/conf.d/omf.fish...
Setting up Oh My Fish configuration...
Updating https://github.com/oh-my-fish/packages-main master... Done!
Installing package default
✔ default successfully installed.
Installation successful!
Welcome to fish, the friendly interactive shell
⋊> /h/wsh on h ⨯ # -----------------------------------------------------------    18:36:46
⋊> /h/wsh on h ⨯ # dirh still works                                               18:37:28
⋊> /h/wsh on h ⨯ dirh                                                             18:37:31
    /home/wsh

⋊> /h/wsh on h ⨯ cd /                                                             18:37:48
⋊> / dirh                                                                         18:37:51
 1) /home/wsh
    /

⋊> / prevd                                                                        18:37:52
⋊> /h/wsh on h ⨯ # -----------------------------------------------------------    18:37:55
⋊> /h/wsh on h ⨯ # Install cd                                                     18:38:22
⋊> /h/wsh on h ⨯ omf install cd                                                   18:38:38
Updating https://github.com/oh-my-fish/packages-main master... Done!
Installing package cd
✔ cd successfully installed.
⋊> /h/wsh on h ⨯ # -----------------------------------------------------------    18:38:43
⋊> /h/wsh on h ⨯ # Now dirh is broken, nextd is always /.                         18:38:49
⋊> /h/wsh on h ⨯ dirh                                                             18:39:09
    /home/wsh
 1) /

⋊> / cd /etc/                                                                     18:39:17
⋊> /etc dirh                                                                      18:39:27
    /etc
 1) /
SanCoder-Q commented 6 years ago

@wataash Thanks for creating this issue. Try to update the plugin with the command: omf update cd Then try to reproduce the issue again. And please confirm either the issue still exists or be fixed.

wataash commented 6 years ago

Now dirh works! Thanks :)