Man pages are displayed in less
(which acts as the so-called “pager” here), so you can search man pages interactively like you search in less
. And you do that by pressing /
, then typing your search term and pressing Enter
. Then you can jump between results with n
and Shift+n
. This is also how search works in vim
, by the way.
Perhaps another tip in this regard, to search in your command history with Bash (for re-running a command you’ve previously used), you can press Ctrl+R
, then start typing your search term. Pressing Enter
will run the displayed command. To skip to older search results, press Ctrl+R
again. If you want to edit a command before running it, press →
or Ctrl+F
instead of Enter
.
This UI is a bit fiddly in Bash, but worth figuring out.
As for Fish, it’s great for new users, because:
- it has a much more intuitive
Ctrl+R
UI, displaying all the search results interactively and not behaving weirdly in certain situations. - it automatically sifts through your command history as you type and suggests the most recent command which starts with the prefix you typed. You can fill in its suggestion with
→
orCtrl+F
, or only use the next word from it viaAlt+F
. You can skip to older matches with↑
, which is then a proper search likeCtrl+R
in Bash, so not just prefix-matching. And yeah, overall just really useful, because it’ll both make it quicker to run frequently-used commands, and sometimes suggest a complex command which I didn’t even remember that I once ran. - its tab-completion shows short descriptions of what most (sub-)commands or arguments do.
But:
- don’t set it as your system-wide default shell or there’s some chance of shell scripts not executing correctly. What you should do instead, is to set it as the startup command to run in your terminal emulator.
- the syntax of Fish is somewhat different to that of Bash, which can be confusing when you’re still learning the Bash syntax. It’s not the worst thing in the world, as it basically only affects scripting and more complex command chains.
Scripting is not a problem, because you can throw a shebang into the first line to use Bash syntax (or
). You should add a shebang to your scripts anyways.
And running more complex commands isn’t too big of a deal either, because you can runbash
in your terminal to launch Bash, then paste the command into there to run it, and then quit back to Fish withexit
orCtrl+D
. Typically you’ll know to runbash
, because Fish’s syntax highlighting turns red after you’ve pasted a complex command.
Probably need to post your country/region. Many of the better online stores are regional.
For Germany, grundstoff.net has a good selection. They seem to ship all over Europe, but the webpage is only German…