4 ms·
You are probably referring to fish shell which has this feature (https://fishshell.com/ https://fishshell.com/). However, I find that zsh + ohmyzsh works just
by pd0wm 8y ago
You are probably referring to fish shell which has this feature (https://fishshell.com/ https://fishshell.com/).
However, I find that zsh + ohmyzsh works just as well. After typing the beginning of a command you can use the arrow keys to cycle through all commands in the history with the same beginning.
A third method for efficient history search is ctrl+r. Just press ctr+r and start typing part of the command. Then you press enter to execute or ctr+r to cycle through the history.
- hellofunk 8y agoctr+r is a great tip!
- patrec 8y agoIt's worth getting used to your new discovery a bit first (C-r is isearch-backward), partly because it's useful in other places, too – for example ipython or any decent programming language shell has emacs-derived keybindings including isearch via readline or a clone. But after that, I'd suggest giving fzf (https://github.com/junegunn/fzf https://github.com/junegunn/fzf) a try.
- gtm1260 8y agofish is nice but I've ran into too many issues where some weird shell command / script I find online is expecting to be in bash and I have to switch out of fish, so its hard for me to switch.
- ufo 8y agoYou can usually drop to a bash subshell for those
- dagmx 8y agoAs long as they don't need to be sourced, you can just add a shebang for bash at the top of the scripts and run them via bash.
- Macha 8y agoIf they do need to be sourced, you can use bass: https://github.com/edc/bass https://github.com/edc/bass
- breatheoften 8y agoWow this is neat — I’m gonna try this out. Does it really work?
- Macha 8y agoIt works at least for nvm (caveat: Installed from nvm directly, not homebrew), and my company's ssh setup script, which are the two reasons I've had cause to use it.
- h1d 8y agoJust run it with bash then. The syntax is too different to run bash script on fish.
- ComputerGuru 8y agoFish 3 will fix a lot of that. Try the nightly builds.
- canhascodez 8y agooh-my-zsh is effectively unmaintained. That is not the worst thing in the world, but one may wish to consider prezto as an alternative: https://github.com/sorin-ionescu/prezto https://github.com/sorin-ionescu/prezto
- h1d 8y agoOr zplug which allows you to load oh-my-zsh scripts as well.
- iends 8y agoI see like 6 commits to oh-my-zsh in the past week. Why do you say its not maintained?
- canhascodez 8y ago688 open pull requests, the existence of a half-dozen competing projects, and Robby's blog post suggesting that he doesn't take the project seriously.
- h1d 8y agoUsing integrated fzf is so much better than cycling through one by one.
- jasonm23 8y agoZsh also has history completion of words. M-/ (opt/alt + /)