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

Gum Filter Being Weird #454

Open
2200g opened this issue Nov 22, 2023 · 1 comment
Open

Gum Filter Being Weird #454

2200g opened this issue Nov 22, 2023 · 1 comment
Labels
bug Something isn't working cmd/filter

Comments

@2200g
Copy link

2200g commented Nov 22, 2023

Describe the bug
A clear and concise description of what the bug is.

  • at first i got this issue where each new line made because of the command being too long ended up as an option
  • i thought adding --width to my gum arguments would fix it and i ran a xargs --show-limits
  • but it just ends up getting weirder? idk it seems like the options arent being displayed correctly at all, with arguments getting jumbled up and stuff

To Reproduce
Steps to reproduce the behavior:

history | cut -c 8- | uniq | tac -s' '| gum filter --sort --indicator="" --header="Select Command." --height=9 --placeholder="" --reverse| xclip -r -selection c

or

history | cut -c 8- | uniq | tac -s' '| gum filter --sort --indicator=""  --width="2088866" --header="Select Command." --height=9 --placeholder="" --reverse| xclip -r -selection c

Expected behavior
A clear and concise description of what you expected to happen.
Expected gum filter to display a single line as a single option no matter how long it is.
Expected the width argument to make it so that the long line fits in a single option

Screenshots
If applicable, add screenshots to help explain your problem.
image
image
image

Desktop (please complete the following information):

  • OS: [e.g. iOS] Arch Linux
  • Browser [e.g. chrome, safari] Firefox
  • Version [e.g. 22] of?

Additional context
Add any other context about the problem here.
image

@MikaelFangel
Copy link
Contributor

If you just remove -s' ' from the tac command, it seems to work just fine. If your problem is something different, can you provide a more minimal example that highlights the problem?

I've even tried to create an absurdly long string and it still works as expected:

Tested with:

cat test.txt | ./gum filter --sort --indicator="▶" --header="Select Command." --height=9 --placeholder="" --reverse

test.txt

@caarlos0 caarlos0 added bug Something isn't working cmd/filter labels Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cmd/filter
Projects
None yet
Development

No branches or pull requests

3 participants