mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-01 04:30:37 +02:00
Add Atom plugin/alias based on Textmate plugin
This commit is contained in:
parent
5464fe3e4a
commit
0a234b4e5d
1 changed files with 13 additions and 0 deletions
13
plugins/atom/atom.plugin.zsh
Normal file
13
plugins/atom/atom.plugin.zsh
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue