Coder Social home page Coder Social logo

Comments (2)

junegunn avatar junegunn commented on August 15, 2024

There's a comment there #102 (comment) that claims

echo foo bar baz qux foo | fzf --with-nth 3,2,4 --nth ..

should match with fofo but it doesn't. Doesn't match foo either.

You're reading it the other way around, probably missed "Suppose we're ..." part. The point of the comment is that it's confusing, and I don't want fzf to behave like that. I still feel exactly the same because fzf is essentially a line filter, like grep.

If you really want fzf to match parts that are not visible, you could manually format the input and place the part beyond the screen width.

printf "%s%1000s" foo bar | fzf --nth -1 --no-hscroll --ellipsis ''

from fzf.

seivan avatar seivan commented on August 15, 2024

I resorted to abusing tabs. I gotta say it's an ugly method, I don't understand the hesitance to allow search over words that are not in the search panel, but say in the preview panel instead? There's limited space, so shoving everything in there via clumsy hacks instead of just allowing it seems weird.

selected=$(echo "Description:::desc:::name:::john:::surname:::smith" | \
awk -F ":::" '{print $2 " [" $4 "]\t" $0 "\t\t\t\t\t\t\t\t\t\t\t\t\t\t" $6}' | \
fzf --delimiter="\t" --with-nth=1,3..-1 --preview 'echo {} | awk -F "\t" '\''{split($2,a,":::"); print a[1]":\n  " a[2] "\n\n"a[3]":\n  " a[4] "\n\n" a[5]":\n  " a[6] "\n\n"}'\''' --preview-window=right:65%)


# Extract the command from the selected output
res=$(echo "$selected" | awk -F "\t" '{print $NF}')

# Run the command
echo $res

Just from a user UX PoV it's just a tad too much.

from fzf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.