how to use/get a section from selection #3485
Answered
by
LangLangBart
danie-dejager
asked this question in
Q&A
-
|
I have a list of servers with hostname, IP, location and description separated with = (but could be anything) How can I make a selection with fzf but have it only use the hostname section to call ssh? All the solutions I've found so far would cut off the other fields and therefore not get displayed.
|
Beta Was this translation helpful? Give feedback.
Answered by
LangLangBart
Oct 24, 2023
Replies: 1 comment 1 reply
-
cat servers.txt |
fzf --delimiter '=' --preview 'echo {1};echo {2};echo {3}' --preview-window nohidden
cat servers.txt |
fzf --delimiter '=' --bind 'enter:become:echo I have selected: {1}'
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
danie-dejager
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


delimiterflag andFIELD INDEX EXPRESSIONman fzf{}{2}{2..}+fsfzfyou can then define a hotkey to perform anaction, for exampleexecuteorbecomefzf'sman page and the the CHANGELOG.md will helpcat servers.txt | fzf --delim…