irongit

A combination of vim and bash that I find useful

gcode now finds a file and lets you open it

huncholanehuncholaneauthored
parent 3f4622ecommit 6f260936d25880cfa1d34f2d1011318d4076b9afBrowse files

1 file changed, +15 -0

+15-0ghost.sh
@@ -105,3 +105,18 @@ function rootrun {
105105 done
106106 cd $start
107107 }
108+function gcode {
109+ local files=`find . -name $1`
110+ local i=0
111+ local choices=( )
112+ for r in $files;do
113+ echo "$i) $r"
114+ choices+=( $r )
115+ let i=i+1
116+ done
117+ echo "What file do you want?"
118+ read choicenum
119+ local choice=${choices[$choicenum]}
120+ echo "Opening $choice with vscode"
121+ code $choice
122+}