Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

marks command doesn't print the link destination correctly #10

Open
garyp opened this issue May 28, 2019 · 2 comments · May be fixed by #11
Open

marks command doesn't print the link destination correctly #10

garyp opened this issue May 28, 2019 · 2 comments · May be fixed by #11

Comments

@garyp
Copy link

garyp commented May 28, 2019

The jump goes to the correct place, but the marks command just prints out the location of the mark file rather than the mark destination:

~ » marks
downloads           ->  /Users/gary/.marks/downloads
» command ls -ld $MARKPATH/downloads
lrwx------  1 gary  staff  21 Mar 29 17:06 /Users/gary/.marks/downloads -> /Users/gary/Downloads
~ » jump downloads
~/Downloads » pwd
/Users/gary/Downloads

This is on macOS 10.14.5 with fish 3.0.2.

@klane klane linked a pull request Oct 2, 2019 that will close this issue
@lwd27
Copy link

lwd27 commented Jun 7, 2020

The behavior of pwd seems to have changed between fish v2 and v3. The pwd command has two options: -L for logical path and -P for physical path. In fish 2.7.1 such as found on Ubuntu 18.04 LTS it defaults to -P (same as /bin/pwd) but in fish 3.x it defaults to -L. An easy fix would be to change line 21 to read
set -l real_path (pwd -P)

The realpath function requires an argument in fish 3.1.0 and older. It seems to have been fixed in 3.1.2 so that it uses current directory if none is specified. But that could present a problem for backwards compatibility (Ubuntu 18.04 LTS is supported until 2023, I think, so fish v2.x will be out there for awhile yet).

@lwd27
Copy link

lwd27 commented Jun 7, 2020

Just noticed that in fish 2.7.1 pwd doesn't take any args and throws an error if you pass the -P flag. Do we have to check the fish version before using the pwd builtin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants