Hacker News new | ask | show | jobs
by bubblesorting 4373 days 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 :)