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

How the demo works like "fix commands"? #491

Closed
kondongx opened this issue Apr 11, 2021 · 9 comments
Closed

How the demo works like "fix commands"? #491

kondongx opened this issue Apr 11, 2021 · 9 comments
Labels
bug Something isn't working

Comments

@kondongx
Copy link

kondongx commented Apr 11, 2021

image

What show I do when finish "remove first line" then get "tail -n +2"?

@kondongx kondongx added the bug Something isn't working label Apr 11, 2021
@welcome
Copy link

welcome bot commented Apr 11, 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! :)

@kondongx kondongx changed the title How the demo works like "shell container"? How the demo works like "fix comment"? Apr 11, 2021
@kondongx kondongx changed the title How the demo works like "fix comment"? How the demo works like "fix commands"? Apr 11, 2021
@denisidoro
Copy link
Owner

denisidoro commented Apr 11, 2021

Assuming you have a cheatsheet that contains the following:

% text

# remove first line
tail -n +2
  • install navi 2.15.0+
  • install the shell widget
  • type ls | remove first line without hitting enter
  • press Ctrl+G

For the more advanced use cases, the instructions in the README file may help.

Sidenote: the fish widget currently doesn't have as many features as the ones for bash and zsh.

@denisidoro denisidoro pinned this issue Apr 11, 2021
@denisidoro denisidoro unpinned this issue Apr 11, 2021
@denisidoro denisidoro pinned this issue Apr 11, 2021
@kondongx
Copy link
Author

I got it! Thanks.

@notDavid
Copy link

Sidenote: the fish widget currently doesn't have as many features as the ones for bash and zsh.

@denisidoro Hi there, so could you clarify whether the example you mention in the comment above, where the remove first line text gets replaced with Ctrl+G currently does or does not work in fish, and navi 2.18.0 ?

Thank you!

@denisidoro
Copy link
Owner

fish still doesn't support this smart "widget"

fish could totally support it, though. It's just that I'm not familiar with fish scripting.

If anyone could translate the bash/zsh widgets to fish, that would be awesome!

@notDavid
Copy link

@denisidoro Thanks. I created an issue for clarity so people know, and perhaps someone can fix it… :-)

@vivekragunathan
Copy link

vivekragunathan commented Dec 16, 2021

Sidenote: the fish widget currently doesn't have as many features as the ones for bash and zsh.

@denisidoro Hi there, so could you clarify whether the example you mention in the comment above, where the remove first line text gets replaced with Ctrl+G currently does or does not work in fish, and navi 2.18.0 ?

Thank you!

Did you get this working? I am on 2.18.0 and does not work. Hitting Ctrl+G looks like it attempts to run something but moves to a new prompt. In this case, I have tail -n +2 defined in a cheatsheet, and navi --query remove lists the cheat.

Also, none of the built-ins cheat work too. For instance, there is a cheat Checkout to branch. Even cheats like those do not work, just jump to a new prompt.

@notDavid
Copy link

Did you get this working?

No, the "smart replace" functionality does not work in fish shell yet, see the open issue: #648 (comment)

@funkyfisch
Copy link

funkyfisch commented Mar 2, 2024

I don't wanna open any other issues so I'm posting here:
Is there a way to make navi behave by default the way it behaves in the ctrl+g? As in running navi, picking a command, and that then appearing right after my prompt, ready to be executed when I press enter. I start suspecting that this is impossible - can someone redirect me to any resource explaining why it isn't possible to do so?

the best I have done is to alias navi with navi --print | xclip and then hitting ctrl+(shift+)+v and enter

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

No branches or pull requests

5 participants