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

Replace external tools with fish builtins #23

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AbysmalBiscuit
Copy link
Contributor

This PR replaces the use of external tools (grep and perl) with fish builtin string command.
This should fix both issues #21 and #22.

Fix issue fishgretel#22
Fix issue fishgretel#21

Replace use of external tools (grep and perl) with fish builtin string.
If the 'exit' command was part of the command line, then fish would
give a warning and not exit due to how the fasd command was running
in the background.

Adding a disown after it will stop it from throwing this error.

Fix small issue with printf formatting in __fasd_expand_vars
@AbysmalBiscuit
Copy link
Contributor Author

The second commit will fix the annoying warning if exit was part of the command line that was being evaluated.

@igor-kupczynski
Copy link

Would be nice to merge it. Currently, on macos, if you don't have the gnu coreutils as the default the plugin fails with:

usage: grep [-abcDEFGHhIiJLlmnOoqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
	[-e pattern] [-f file] [--binary-files=value] [--color=when]
	[--context[=num]] [--directories=action] [--label] [--line-buffered]
	[--null] [pattern] [file ...]

The reason is that grep -P is supported on the macos grep. This replaces echo -n $argv | grep -oP with string match -a -r

@gregatgoogle
Copy link

Can we proceed with this PR? I find the grep -P issue quite irritating on macOS.

remigourdon added a commit to remigourdon/dotfiles that referenced this pull request Apr 11, 2022
guerrero added a commit to guerrero/dotfiles that referenced this pull request Aug 10, 2022
 Latest fishgretel/fasd version introduces a dependency on
 GNU grep because FreeBSD doesn't support the -P flag.

 This change replaces fishgretel repo by abysmalbiscuit due
 it seems fishgretel/fasd has been inactive for a long time

 Link to the specific PR:
 fishgretel/fasd#23
@Geker
Copy link

Geker commented Aug 29, 2022

Can we proceed with this PR? I find the grep -P issue quite irritating on macOS.

for a temporary solution, alias will fix it
alias grep /usr/local/bin/ggrep

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.

4 participants