Today I Learned

hashrocket A Hashrocket project

Remove a shell function

Say you wrote a function that you don't want anymore:

# ~/.bashrc
function rake() {
  echo 'rake is gone ;)'
}
$ rake db:migrate
rake is gone ;)
$

You can remove it with the unset command:

$ unset -f rake

The -f flag passed to unset ensures that we only remove a function.

See More #command-line TILs