Skip to content

Conversation

@ardentsword
Copy link

@ardentsword ardentsword commented May 21, 2025

This introduces the same behavior from z for zsh (and requested in #117)

if set -q q[1]
set target (command awk -v t=(date +%s) -v typ="$typ" -v q="$q" -F "|" $z_script "$Z_DATA")
else
set target (path resolve $HOME)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good but I think we should skip the path resolve, it introduces unnecessary constraints on the fish version, and I don't think using the resolved directory name as logical pwd is what the user expects.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes a lot of sense, I did it out of habit. I'm not very well versed in fish script yet

Copy link
Author

@ardentsword ardentsword Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@krobelus I have to admit that I'm at a loss on how to solve this properly:
If I simply do set target $HOME or set target "$HOME", the pushd does not work.
If I then echo $target in between the assignment and the pushd, it does work.
set target (echo $HOME) works as well, would that be a cleaner solution?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If set target $HOME does not work, and set target (echo $HOME) does,
then there must be something weird inside your $HOME variable, which is unlikely.
set target $HOME should work;
because it will make pushd $target equivalent to pushd $HOME which certainly works here.

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 this pull request may close these issues.

2 participants