8000 How the demo works like "fix commands"? · Issue #491 · denisidoro/navi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

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

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

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

kondongx opened this issue Apr 11, 2021 · 10 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.

Uh oh!

There was an error while loading. Please reload this page.

@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

@alexis-opolka
Copy link
Collaborator
alexis-opolka commented Mar 15, 2025

Hi @funkyfisch , sorry for the late answer but you can look at those issues: #903 #945 #953 .
These issues might give you a way to do your own implementation on what you want to do.

EDIT: And don't hesitate to create an issue, you will have a greater chance to have an answer than posting on an already closed issue. 😄

@alexis-opolka alexis-opolka unpinned this issue Apr 7, 2025
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

6 participants
0