Added 'new' command for ref.

pull/33/head
Mark Szymanski 2010-12-05 20:50:57 -06:00
parent db8d567b14
commit 145886305c
1 changed files with 8 additions and 4 deletions

View File

@ -41,8 +41,6 @@
# #
# array # array
# select # select
#
# I hope that you like this plugin and if you have any questions about it, send me (mrman208) a message on GitHub or email me at mrman208@me.com
##################################################################################################################################################################### #####################################################################################################################################################################
ref() { ref() {
@ -53,20 +51,26 @@ ref() {
REF_DIR=${REF_DIR%/} REF_DIR=${REF_DIR%/}
builtin cd $REF_DIR
if [ "$1" = 'ls' ] if [ "$1" = 'ls' ]
then then
if [ "$2" = '' ] if [ "$2" = '' ]
then then
builtin cd "$REF_DIR"
ls -G ls -G
builtin cd - > /dev/null builtin cd - > /dev/null
return return
else else
builtin cd "$REF_DIR"/"$2"
ls -G ls -G
builtin cd - > /dev/null builtin cd - > /dev/null
return return
fi fi
elif [ "$1" = 'new' ]
then
mkdir -p "$2"/"$3"
echo You can now put the index.html file into "$REF_DIR"/"$2"/"$3"
builtin cd - > /dev/null
return
fi fi
DIR="${1}/${2}" DIR="${1}/${2}"