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

Add '--' to all calls to string #16

Merged
merged 2 commits into from
Jun 17, 2021
Merged

Conversation

matiasjrossi
Copy link
Contributor

Description

Initially looked into this to solve the following bug:

❯ ls \
      --foobarstring trim: Unknown option '--foobar'

~/.config/fish/functions/__abbr_tips_bind_newline.fish (line 1):
in command substitution
	called on line 3 of file ~/.config/fish/functions/__abbr_tips_bind_newline.fish
in function '__abbr_tips_bind_newline'

(Type 'help string' for related documentation)

ls: unrecognized option '--foobar'
Try 'ls --help' for more information.

Then went ahead and made the same changes across the plugin.

With the changes to functions/__abbr_tips_bind_newline.fish the error message is prevented:

❯ fisher install matiasjrossi/fish-abbreviation-tips
fisher install version 4.3.0
Fetching https://codeload.github.com/matiasjrossi/fish-abbreviation-tips/tar.gz/HEAD
Installing matiasjrossi/fish-abbreviation-tips
           /home/matiasr/.config/fish/functions/__abbr_tips_bind_newline.fish
           /home/matiasr/.config/fish/functions/__abbr_tips_bind_space.fish
           /home/matiasr/.config/fish/functions/__abbr_tips_init.fish
           /home/matiasr/.config/fish/conf.d/abbr_tips.fish
Installed 1 plugin/s


❯ ls \
      --foobar
ls: unrecognized option '--foobar'
Try 'ls --help' for more information.

❯ git status
fatal: not a git repository (or any of the parent directories): .git

💡 gs => git status

Related issues

N/A

Notes

Tests passing.

@gazorby
Copy link
Owner

gazorby commented Jun 17, 2021

Thanks @matiasjrossi!

@gazorby gazorby merged commit 6b48f50 into gazorby:master Jun 17, 2021
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