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

Stop allowing configurable z and zo commands #109

Closed
wants to merge 2 commits into from
Closed

Stop allowing configurable z and zo commands #109

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 8, 2022

This implements what we discussed here: #107 (comment). By moving to a static command we can ship the command and its completions in the format that fisher expects. This isn't just useful for fisher, it also works better with fish. By shipping static commands fish can lazy load both the commands and their completions. This means we don't have to run setup for this in conf.d scripts. It also simplifies the code a little bit.

Users can still easily create an alias fn, which is the canonical fish way of renaming a command. That way, even if they want to alias the command they can still retain the lazy loading.

Also, I took a look with grep.app, and could find only two users who were using a custom z command: see here. So this seems ok to change if we want to.

set -U ZO_CMD "$Z_CMD"o

if test ! -z $Z_CMD
function $Z_CMD -d "jump around"
Copy link
Author

@ghost ghost Apr 8, 2022

Choose a reason for hiding this comment

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

I think jump around and open target dir (line 30 of this file), were the descriptions that were used by fish for the user-facing functions. I kept the one that was in __z.fish as it seems more complete, but if you want we can use these instead.

@ghost
Copy link
Author

ghost commented Apr 8, 2022

I've rebased on master. I think all that's left now is to regenerate the man pages. Do we have to do that manually?

Comment on lines -63 to -65
* `set -U Z_CMD "j"`:
Change commands to `j` and `jo`

Choose a reason for hiding this comment

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

Maybe explain somewhere that aliases can be made (preferably) with abbr or function --wraps

Copy link
Author

Choose a reason for hiding this comment

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

Yeah that sounds good. I don't really have the time anymore to work on this though.

@ghost ghost closed this by deleting the head repository Jul 22, 2023
This pull request was closed.
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.

1 participant