A combination of vim and bash that I find useful
gcode now finds a file and lets you open it
1 file changed, +15 -0
+15-0ghost.sh
| @@ -105,3 +105,18 @@ function rootrun { | ||
| 105 | 105 | done |
| 106 | 106 | cd $start |
| 107 | 107 | } |
| 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 | +} |