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

Search in and/or output only selected parts of lines #185

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

Conversation

d3m3t3r
Copy link

@d3m3t3r d3m3t3r commented May 27, 2024

Re-publishing my old change (#111...not quite sure why I closed it back then) adding support for splitting the input to fields where certain field can be used for searching and another field for the output of the command.

    -d, --delimiter=DELIM      Use DELIM to split the line to fields (default ':')
    -f, --field=NUM                Use field NUM for searching (default is the whole line)
    -F, --output-field=NUM   Use field NUM for output (default is the whole line)

For instance, cat /etc/passwd | fzy -d: -f1 -F6 will fuzzy-search the usernames and then print the home directory of the chosen user.

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.

None yet

1 participant