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

Swap to upside down/reversed output #53

Open
steveb-123 opened this issue Oct 19, 2021 · 2 comments
Open

Swap to upside down/reversed output #53

steveb-123 opened this issue Oct 19, 2021 · 2 comments

Comments

@steveb-123
Copy link

The default output, with the prompt at the bottom feels unexpected to me. After a week of use I'm still looking up for a moment first.

Is there any straightforward way to reverse, or otherwise customise the order of the output?

I want to switch so that the prompt is at the top and the search list order shows the best match at the top.

Apologies if I missed something, I glanced through the .sh but it didn't leap out at me. I appreciate the simplicity of the project so I understand that this might be out of its scope or annoying to implement.

Thanks!

@Biont
Copy link
Owner

Biont commented Oct 19, 2021

This should be possible by invoking fzf with the proper arguments as described here.

The real question is what's the best way to pass these arguments from the launcher. There's another issue that explores a generic way to pass fzf arguments into the launcher which is probably preferable to single-purpose flags for things like reversing the layout. I will link to the issue when I am back at my PC

@steveb-123
Copy link
Author

Thanks for the pointer ...I didn't realise this was all just coming straight out of fzf!

Adding --reverse and removing the preview lines in that section got it to how I like it.

It would be worth including some generic way to remove or alter default included flags as well as adding them.

For any cut n pasters, here is the edited section...

readarray -t COMMAND_STR <<<$(
  fzf --ansi +s -x -d '\034' --nth ..3 --with-nth 3 \
    --print-query \
    --reverse \
    --no-multi --cycle \
    --prompt="${GLYPH_PROMPT-# }" \
    --header='' --no-info --margin='1,2' \
    --color='16,gutter:-1' \
    <"$FZFPIPE"
) || exit 1

Thanks!

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

No branches or pull requests

2 participants