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

string match needs option to print entire line matching the pattern #3957

krader1961 opened this issue Apr 16, 2017 · 2 comments


Copy link

So I was converting a bunch of __fish_sgrep uses and noticed that the equivalent string match only prints the portion of the line matching the pattern. That is, string match default behavior is equivalent to __fish_sgrep -o (i.e., grep -o). Rather than forcing people to prefix and append extra wildcard characters so the entire string/line is printed it would be nice if there was a flag to request the entire string (or line) be printed.

See also issue #3956 which I mistakenly opened thinking the default behavior is what I'm requesting here due to an unrelated problem in converting a use of __fish_sgrep.

@krader1961 krader1961 added this to the fish-future milestone Apr 16, 2017
Copy link
Contributor Author

FWIW, this should probably be done via a --filter / -f flag for consistency with the proposed fix for issue #3348.

@krader1961 krader1961 self-assigned this Apr 24, 2017
@krader1961 krader1961 modified the milestones: 2.6.0, fish-future Apr 24, 2017
Copy link
Contributor Author

I am going to implement similar logic for string replace --filter in the next few days to resolve issue #3348. Both changes will make using the string command in fish 2.6.0 "friendlier".

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

1 participant