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

Request: Option to match only typed command without path #109

Open
1 of 4 tasks
pinpox opened this issue Oct 22, 2020 · 0 comments
Open
1 of 4 tasks

Request: Option to match only typed command without path #109

pinpox opened this issue Oct 22, 2020 · 0 comments

Comments

@pinpox
Copy link

pinpox commented Oct 22, 2020

Issue Details

It would be very helpful to have the option to ignore the path typed when searching for existing aliases for the input.

E.g. supposed this alias is configured:

alias gc="git commit"

These inputs should all be mached:

git commit              # works
/usr/bin/git commit # does NOT work
./git commit            # does NOT work

This behaviour could be made optional and will help to make the plugin useful for "hardcoded" binaries that might not be in $PATH.

Apart form binaries that the user might not want to have in $PATH for whatever reason, this would fix the usage on nixOS where it is common practice to have shell configs and scripts generated like alias gc="${pkgs.git}/bin/git commit" (pkgs.git gets expanded to wherever the binary might be in the packge)

Operating System (uname -a)

Linux kartoffel 5.4.70 #1-NixOS SMP Wed Oct 7 06:01:31 UTC 2020 x86_64 GNU/Linux

zsh version (zsh --version)

zsh 5.8 (x86_64-pc-linux-gnu)

you-should-use version (echo "$YSU_VERSION")

1.7.3

How is zsh-you-should-use installed?

  • zplug
  • oh-my-zsh
  • Antigen
  • Other (please specify)
    Via nixOS configuration.

Steps to reproduce the issue

alias e="/bin/echo"
echo "something"

gist link to your zshrc

https://gist.github.com/pinpox/87e1b4e2d2cbeff2c26c1aa6177294ff

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

No branches or pull requests

2 participants