gazorby / fish-abbreviation-tips

💡 Help you remembering your abbreviations
MIT License
291 stars 7 forks source link

Error on alias -s #12

Closed tuxiqae closed 3 years ago

tuxiqae commented 3 years ago

Describe the bug fish-abbreviation-tips doesn't handle alias -s well (or any other alias flags) , prints out the following error but creates the alias:

❯ alias -s rmi="rm -i"
string match: Unknown option “-s”

~/.config/fish/conf.d/abbr_tips.fish (line 47):
        if string match -q '*=*' "$command[2]"
           ^
in function '__abbr_tips' with arguments 'alias\ -s\ rmi=\"rm\ -i\"'
in event handler: handler for generic event “fish_postexec”

(Type 'help string' for related documentation)

To Reproduce Run the following command alias -s rmi="rm -i"

Expected behavior I'd expect not to see that error.

Screenshots image

image

System (please complete the following information):

❯ fish --version
fish, version 3.1.2
❯ cat /etc/os-release
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://www.archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
LOGO=archlinux
❯ uname -r
5.9.14-arch1-1

Additional context Add any other context about the problem here.

gazorby commented 3 years ago

Hi @tuxiqae sorry for the delay, and thanks for reporting!

My last commit (71662df06da763d3d38d93706555beb2ffce22e3) should fixes the issue.

Can you confirm it by updating the plugin?