denisidoro / navi

An interactive cheatsheet tool for the command-line
Apache License 2.0
14.61k stars 489 forks source link

Optional placeholder value for variable #889

Closed xy-241 closed 3 months ago

xy-241 commented 3 months ago

Is your feature request related to a problem? Please describe. I created my own .cheat file. However, I realized that when I give a placeholder value to a variable using $, I don't have an option to modify the placeholder value directly within the navi program. Instead, I can only modify it in the terminal after selecting the command, which becomes inconvenient for long commands.

Describe the solution you'd like Maybe we can have shortcut to indicate we want to modify the placeholder value.

welcome[bot] commented 3 months ago

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! :)

jc-SpaceXp commented 3 months ago

Doesn't $ navi --fzf-overrides-var '--no-select-1' provide this?

This gif demonstrates the behaviour: https://asciinema.org/a/Su5eUYFHn7M5A6Yccvcv7WH7k/ With each \<VAR> in your cheatsheet being $ VAR : echo 'placeholder'

xy-241 commented 3 months ago

That is exactly what I was looking for, thanks 🙏🏼!