3 ms·
Working at the Command Line is a superpower especially when combined with auto-suggestions from tools such as zsh + oh-my-zsh. I would be completely lost if I
by d4rkp4ttern 4y ago
Working at the Command Line is a superpower especially when combined with auto-suggestions from tools such as zsh + oh-my-zsh.
I would be completely lost if I didn’t have the auto suggestions as my “second brain” !
One problem though — to run a variant of an existing previous command, I find myself editing super long command lines, I.e bring up a previous command by accepting the auto-suggestion, then Ctl-b thru it and make an edit to run a new variant. This made me wonder: is there some tool that presents a TUI type of 2-dimensional interface that lets me navigate through the various options using arrow keys etc ?
- rascul 4y agoHave you looked at hstr? https://github.com/dvorka/hstr https://github.com/dvorka/hstr
- d4rkp4ttern 4y agoWow thanks for this suggestion. Reminds me why I love HN :)
- weeeeelp 4y agohey that's pretty cool! just installed and works nicely on zsh
- vaughan 4y agoSo cool!
- evulhotdog 4y agoI can’t directly answer your question, but in iTerm2, I am able to option+click to where I want to put the cursor, and it will put your cursor exactly there. This allows you to edit annoying long command with more ease and (kind of) a GUI feature in a sense.
- nequo 4y agoNot the TUI you are asking for but TIL about Ctrl-X Ctrl-E from this link which starts up your text editor to edit the command.
- d4rkp4ttern 4y agoThanks for pointing this out!
- mejutoco 4y agoI like zsh, and I want to mention the fish shell auto-completion. I start typing anything contained in a command in history (not necessarily the beginning) and can flip through the searches with up and down arrows. It is nicely highlighted, and the default, so I do not need to spend too much time fiddling with settings.
- d4rkp4ttern 4y agoA trick I should mention - when setting up a new machine, copy the .zsh-history file, then your brain gets ported to the new machine as well :)
- BrightOne 4y agohttps://github.com/ellie/atuin https://github.com/ellie/atuin is a TUI with the added option of syncing history between shells and machines.
- d4rkp4ttern 4y agoLooks worth checking out, thanks
- henry_viii 4y agohttps://github.com/zsh-users/zsh-autosuggestions https://github.com/zsh-users/zsh-autosuggestions is nice but personally I prefer: https://github.com/marlonrichert/zsh-autocomplete https://github.com/marlonrichert/zsh-autocomplete
- d4rkp4ttern 4y agoThank you. Indeed this is super nice.
- MonkeyClub 4y ago> is there some tool that presents a TUI type of 2-dimensional interface In an Emacs shell, that's the default behaviour - then you can edit a previous command, and by pressing Enter it gets copied to the command line and executed.