Closed philwhln closed 4 years ago
Reasonable expectation coming from fish, but this is intentional. You can work around it by appending a space to the expansion:
abbr -e pods[ctrl-space][enter]
abbr pods kubectl get pods\[space][enter]
pods[enter] # expands to `kubectl get pods ` and accepts
[up arrow, `!!`, etc] # `kubectl get pods `
But good news! It's changing soon. v3 will distinguish between regular (ie left-anchored) and anywhere-on-the-line abbreviations, just like zsh's alias
/ alias -g
. As with zsh's alias
, left-anchored / fish-abbr-like will be default.
Aiming to release 3.0.0 in the next week and a half 🤞
Aiming to release 3.0.0 in the next week and a half 🤞
Awesome! 👏
3.0.0 is up! Won't have much spare time this week but let me know if you have problems.
Thanks! Tested my kubectl get pods
issues and works great 👍
Glad to hear to hear it
Belatedly recognizing bug reporters in https://github.com/olets/zsh-abbr#community and https://zsh-abbr.olets.dev/community/. would you like to be added @philwhln?
I'm finding that zsh-abbr is expanding words found within the command.
For instance, in fish shell I had abbrs for "master" and "pods", but not I can't use these words in other commands.
Typing "pods" expands to "kubectl get pods", but if I press the up arrow to re-run, it expands to "kubectl get kubectl get pods", which then fails.
Instead, should the expansion only happen for the first word in the string, which I think it what fish does.