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

Closed
krader1961 opened this Issue Apr 16, 2017 · 2 comments

Comments

Projects
None yet
1 participant
@krader1961
Contributor

krader1961 commented Apr 16, 2017

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

This comment has been minimized.

Show comment
Hide comment
@krader1961

krader1961 Apr 23, 2017

Contributor

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

Contributor

krader1961 commented Apr 23, 2017

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

krader1961 added a commit to krader1961/fish-shell that referenced this issue Apr 25, 2017

@krader1961

This comment has been minimized.

Show comment
Hide comment
@krader1961

krader1961 Apr 25, 2017

Contributor

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".

Contributor

krader1961 commented Apr 25, 2017

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment