Skip to content

how to use/get a section from selection #3485

Answered by LangLangBart
daniejstriata asked this question in Q&A
Discussion options

You must be logged in to vote

separated with = (but could be anything)

  • try it with the delimiter flag and FIELD INDEX EXPRESSION
    • see man fzf
Placeholder Description
{} current line
{2} current line with positional field 2
{2..} current line from the 2nd field to the last field
Placeholder expression flags Description
+ space-separated list of the selected lines
f temporary file
s preserve the whitespace
cat servers.txt |
  fzf --delimiter '=' --preview 'echo {1};echo {2};echo {3}' --preview-window nohidden

  • within fzf you can then define a hotkey to perform an action, for example execute or become
cat servers.txt |
  fzf --delim…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@daniejstriata
Comment options

Answer selected by daniejstriata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants