mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-01 04:30:37 +02:00
13 lines
294 B
Bash
13 lines
294 B
Bash
# If the am command is called without an argument, open Atom in the current directory
|
|
# If am is passed a directory, cd to it and open it in Atom
|
|
# If am is passed a file, open it in Atom
|
|
function am() {
|
|
if [[ -z $1 ]]; then
|
|
atom .
|
|
else
|
|
atom $1
|
|
if [[ -d $1 ]]; then
|
|
cd $1
|
|
fi
|
|
fi
|
|
}
|