it is normally a shell builtin.
Recently I learnt that macOS’s default interactive shell, zsh
, has a built-in which
where the -a
option shows you exactly what you get:
% which -a test
test: shell built-in command
/bin/test
Nice!
No.
Well, not easily (-:
The -d
flag will print all the paths searched by man
:
% man -d test 2>&1 | grep "Using manual path"
-- Using manual path: /usr/local/share/man:/usr/share/man:…
You can then list each of these directories to discover all the man pages.
But, yeah, that’s clunky. I tend to use a GUI app for reading man pages. Right now I’m using Man Reader, which shows all the pages on its sidebar.
I still have a copy of Kernighan & Pike on my bookshelf
Likewise.
Although my general advice is that, once you start writing if
statements in shell, it’s time to switch to a better language (-:
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"