Skip to content

Instantly share code, notes, and snippets.

@ahadshafiq
Created April 3, 2013 15:22
Show Gist options
  • Save ahadshafiq/5302170 to your computer and use it in GitHub Desktop.
Save ahadshafiq/5302170 to your computer and use it in GitHub Desktop.
Useful bashrc/.bash_profile/bash.bashrc functions
ListAllCommands | grep searchstr
function ListAllCommands
{
COMMANDS=`echo -n $PATH | xargs -d : -I {} find {} -maxdepth 1 \
-executable -type f -printf '%P\n'`
ALIASES=`alias | cut -d '=' -f 1`
echo "$COMMANDS"$'\n'"$ALIASES" | sort -u
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment