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

zsh: variable with --map does not show in preview window #584

Closed
fjchen7 opened this issue Aug 2, 2021 · 6 comments · Fixed by #600
Closed

zsh: variable with --map does not show in preview window #584

fjchen7 opened this issue Aug 2, 2021 · 6 comments · Fixed by #600
Labels
bug Something isn't working

Comments

@fjchen7
Copy link

fjchen7 commented Aug 2, 2021

Describe the bug
variable with parameter --map won't show in preview window.

To Reproduce

% rg, grep

# search lines matching a pattern in given path
rg <opts> <pattern> <path>

$ opts: echo -e 'option;description\n--column;show column numbers\n-l;print filenames with maches\n--files-without-match;print filenames without matches' | column -t -s';' --- --column 1 --header-lines 1 --multi --map "tr '\n' ' '"

For the above cheatsheet the variable opts won't show in preview window.
Screen Shot 2021-08-02 at 22 53 27
When I remove --map "tr '\n' ' ' it shows, but now each item will be put into different lines which is not expected.

The other variables show as expected
image

Versions:

  • OS: macOS
  • Shell Version: zsh 5.8
  • navi 2.16.0
@fjchen7 fjchen7 added the bug Something isn't working label Aug 2, 2021
@welcome
Copy link

welcome bot commented Aug 2, 2021

Thanks for opening your first issue here! In case you're facing a bug, please update navi to the latest version first. Maybe the bug is already solved! :)

@denisidoro
Copy link
Owner

Screen Shot 2021-08-06 at 10 55 45

I believe it works as expected on my machine 🤔

@denisidoro
Copy link
Owner

Could you try setting bash as shell in the yaml config file?

@denisidoro denisidoro reopened this Aug 6, 2021
@fjchen7
Copy link
Author

fjchen7 commented Aug 8, 2021

Could you try setting bash as shell in the yaml config file?

It works if setting bash in yaml config file. Thanks!

But as it fails to show preview when setting zsh, I think it is still a small bug. should I close this issue?

@denisidoro
Copy link
Owner

denisidoro commented Aug 8, 2021

Thanks for the report!

should I close this issue?

Not yet. I'll look into it. I plan to release a new version this week and hopefully by then I'll have it fixed.

@denisidoro denisidoro changed the title variable with --map does not show in preview window zsh: variable with --map does not show in preview window Aug 8, 2021
denisidoro added a commit that referenced this issue Aug 8, 2021
@kqvanity
Copy link

@denisidoro Is there a better way to annotate custom parameters other than @fjchen7's oneliner. The original string too jammed up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants