Skip to content

Instantly share code, notes, and snippets.

@stormbrew
Last active December 27, 2015 10:29
Show Gist options
  • Save stormbrew/7311138 to your computer and use it in GitHub Desktop.
Save stormbrew/7311138 to your computer and use it in GitHub Desktop.
# Changes to directory passed in $1 and runs the command specified
# by the remaining arguments.
function cdo() {
at=${1}
shift
( # enter a subshell to perform the action
cd "${at}"
"$@"
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment