I have
for cmd in $(compgen -c); do if [[ $cmd =~ ^[0-9a-zA-Z]+$ ]]; then eval "alias $cmd?='man $cmd'"; fi; done
in my .bashrc to alias command?=man command, saves some typing to get to man pages ( which I do very often )
for cmd in $(compgen -c); do if [[ $cmd =~ ^[0-9a-zA-Z]+$ ]]; then eval "alias $cmd?='man $cmd'"; fi; done
in my .bashrc to alias command?=man command, saves some typing to get to man pages ( which I do very often )
# Put this script in a directory in your PATH.
# m: pipe man output through col and save to file(s).
mkdir -p ~/man # Only creates the dir first time, including all dirs in the path.
for name: # in $* is implied
man $name | col -bx > ~/man/$name.m
doneDo a "chmod u+x m" to be able to run it.
Then run it like this:
m ioctl stdio signal # or any other commands
Then:
pushd ~/man; view ioctl.m stdio.m signal.m; popd
to read those pages, now stripped of formatting characters.
% compgen -b # built-ins
% compgen -k # keywords
% compgen -A function # functions
% compgen -abckA function # everything
[1] http://www.cyberciti.biz/open-source/command-line-hacks/comp... for cmd in $(compgen -c); do if [[ $cmd =~ ^[0-9a-zA-Z]+$ ]]; then eval "alias $cmd\?='man $cmd'" ; fi; done
# had to escape the ? in the alias nameCool trick :)