Today's top tip is twofold: 1. In the Z shell, you can get help about the thing ...
JdeBP @JdeBP@mastodonapp.uk
Today's top tip is twofold:
1. In the Z shell, you can get help about the thing under the cursor as you are typing a command-line with ESC followed by 'h'. In several terminal emulators this is the sequence generated when you press [⎇ Alt]+[H]. It's not [F1] for help, as we could do with 4DOS and 4OS2 and Take Command, but it's not bad.
2. Of course, this is just running the man command, which is less than helpful with builtins. But it does not have to. In your .zshrc, unalias the run-help alias and then autoload run-help as a function. There's such a function supplied out of the box, and it knows about Z shell builtins.
https://zsh.sourceforge.io/Doc/Release/User-Contributions.html#Accessing-On_002dLine-Help