5 ms·
For zsh: 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
by bubblesorting 12y ago
For zsh:
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 name
Cool trick :)