4 ms·
You can easily get bash to do that by adding these lines to your .inputrc file. "\e[A": history-search-backward "\e[B": history-search-forward "\e[C": fo
by robochat 4y ago
You can easily get bash to do that by adding these lines to your .inputrc file.
"\e[A": history-search-backward
"\e[B": history-search-forward
"\e[C": forward-char
"\e[D": backward-char
- guitarbill 4y agoNot wrong, but fish is so nice because it just works without any configuration. Sane defaults are a blessing. I just checked and the only things I have configured are `set fish_greeting` (i.e. empty) and some paths... Edit: Also, I don't know how, but the fish completion is magic. It seems to remember which commands I use often in which folders and in which order. I'm not sure if that's how it's implemented. Sure feels that way though.
- notamy 4y ago> It seems to remember which commands I use often in which folders and in which order. I'm not sure if that's how it's implemented. Sure feels that way though. Check ~/.local/share/fish/fish_history!
- rodrigodlu 4y agoNice to know! Nonetheless, what moved me from bash to fish was having this as granted. Now I worry only about specific higher-level functions. Also hunting each of these optimizations distracts me from my task at hand. There's other stuff as well, for instance I'm abusing `for` iterations a lot more to run the same command for lists of things. Using bash before was less ergonomic and painful.
- notorandit 4y agoYou need to restart bash to make this work. Cool.
- cube2222 4y agoMost things in fish can be achieved with customization and configuration in other shells, like zsh or bash. The point of fish is a sane set of defaults that doesn't require customization and is good enough.
- mattgreenrocks 4y agoBest feature of fish is the fact that my fish dotfiles are about 100loc max with a fully async prompt. Comparable functionality in zsh would be 500loc of ultra obscure tweaks :)
- exikyut 4y agoWhat do you mean by "fully async prompt"?
- mattgreenrocks 4y agohttps://github.com/mattgreen/lucid.fish https://github.com/mattgreen/lucid.fish It avoids pauses when doing `git status` on gigantic repos.
- manimino 4y agoIf you want zsh that acts like fish, try "fizsh".
- copper-float 4y agoThat is so cool, people really think of everything don't they?
- oblio 4y agoI checked fizsh out and the installation on Ubuntu was broken (from the package in the repo), the last commit to the repo was in 2016... It seemed promising at first but these things are all about continued investment and maintenance.
- dizhn 4y agoThey are explicitly against configuration options though. Good luck if their opinions about what's sane doesn't match your own. By the way I have that feature in zsh myself. Quite useful.
- msm_ 4y agoFish shell search and suggestions are awesome, and not comparable to what readline gives you. I don't know how it does that, but the shell understands the concept of files, commands in PATH, and CWD. So depending on the directory you are in, after typing "vim " you will get different suggestions (completable by right arrow). Somehow it knows what I mean 80% of the time.