Initial Checkin

This commit is contained in:
Joe
2019-01-04 20:01:27 -06:00
commit 527c684118
5 changed files with 26 additions and 0 deletions

4
.bash_aliases Normal file
View File

@@ -0,0 +1,4 @@
alias qs=qs.sh
alias ql=ql.sh
alias qg=qg.sh
alias qcd=". qcd.sh"

2
qcd.sh Normal file
View File

@@ -0,0 +1,2 @@
path=$(qg.sh $*)
cd "$path"

10
qg.sh Normal file
View File

@@ -0,0 +1,10 @@
echoerr() {
echo "$@" 1>&2;
}
theLine=$(IFS='\t' grep "^${*} " < ~/.qcdrc)
read -r quick path <<< "$theLine"
if [[ -z $theLine ]]
then echoerr Not found: $*
else echo $path
fi

4
ql.sh Normal file
View File

@@ -0,0 +1,4 @@
grep "${*}" ~/.qcdrc | while read theLine
do
echo -e ${theLine/ / -> }
done

6
qs.sh Normal file
View File

@@ -0,0 +1,6 @@
if [[ -z ${*} ]]
then echo you have to supply a quick name.
else grep -v "^${*} " ~/.qcdrc > /tmp/qcd.$$
mv /tmp/qcd.$$ ~/.qcdrc
echo -e "${*}\\t${PWD}" >> ~/.qcdrc;
fi