mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
13 lines
273 B
Bash
13 lines
273 B
Bash
# Quickly access your ~/code directory
|
|
# Setting $CODE_HOME will use that instead of ~/code
|
|
function c(){
|
|
local code_path=${CODE_HOME}
|
|
|
|
if [[ "$code_path" == "" ]]; then
|
|
code_path="$HOME/code"
|
|
fi
|
|
|
|
if [ -d "$code_path/$1" ]; then
|
|
cd "$code_path/$1"
|
|
fi
|
|
}
|