Skip to content

Instantly share code, notes, and snippets.

@darthlukan

darthlukan/mycd.sh Secret

Created May 3, 2017
Embed
What would you like to do?
Shell change directory
## script.sh
#!/bin/sh
$DESIRED_DIR="~/foo"
cd $DESIRED_DIR
## END script.sh
## .bashrc || .zshrc || .profile || .zprofile
alias mycd=". ~/bin/script.sh"
## END .*rc
## In shell
$ pwd
>> ~/
$ mycd
$ pwd
>> ~/foo
##
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment