File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed
Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -10,15 +10,15 @@ Add the keybinding to `keybindings.json`, then in your project make the .vscode
1010
1111```
1212[ -d ".vscode" ] || mkdir ".vscode"
13- SOURCE="https://gist .githubusercontent.com/MarcinKonowalczyk/709e93f08e9d72f8092acd5b8d34c81f/raw/2a1de7e14c654f48c1cdfd8ab50fe00d067c0024 /run.sh"
13+ SOURCE="https://raw .githubusercontent.com/MarcinKonowalczyk/run_sh/master /run.sh"
1414curl $SOURCE > .vscode/run.sh
1515chmod u+x ./.vscode/run.sh
1616```
1717
1818## one-liner
1919
2020```
21- [ -d ".vscode" ] || mkdir ".vscode"; curl https://gist .githubusercontent.com/MarcinKonowalczyk/709e93f08e9d72f8092acd5b8d34c81f/raw/2a1de7e14c654f48c1cdfd8ab50fe00d067c0024 /run.sh > .vscode/run.sh && chmod u+x ./.vscode/run.sh
21+ [ -d ".vscode" ] || mkdir ".vscode"; curl https://raw .githubusercontent.com/MarcinKonowalczyk/run_sh/master /run.sh > .vscode/run.sh && chmod u+x ./.vscode/run.sh
2222```
2323
2424## test
@@ -27,7 +27,7 @@ chmod u+x ./.vscode/run.sh
2727cd ~
2828mkdir test
2929cd test
30- [ -d ".vscode" ] || mkdir ".vscode"; curl https://gist .githubusercontent.com/MarcinKonowalczyk/709e93f08e9d72f8092acd5b8d34c81f/raw/2a1de7e14c654f48c1cdfd8ab50fe00d067c0024 /run.sh > .vscode/run.sh && chmod u+x ./.vscode/run.sh
30+ [ -d ".vscode" ] || mkdir ".vscode"; curl https://raw .githubusercontent.com/MarcinKonowalczyk/run_sh/master /run.sh > .vscode/run.sh && chmod u+x ./.vscode/run.sh
3131touch hi.txt
3232code hi.txt
3333```
@@ -47,7 +47,8 @@ EXTENSION : sh # just the extension of the current file
4747ROOTFOLDER : <same as FILEFOLDER>
4848```
4949
50- ## todos
50+ # todos
5151
52- - [ ] automatically update links on push
53- - [ ] one-liner to update to a new version (diff with one from /stable/)
52+ - [ ] ? run.fish / run.zsh
53+ - [ ] ? script which automatically adds keyboard shortcut to keybindings.json
54+ - [ ] ? find a workaround for something already running in the terminal (e.g. python/julia repl)
Original file line number Diff line number Diff line change 1- # https://gist.github.com/MarcinKonowalczyk/709e93f08e9d72f8092acd5b8d34c81f
2- # Example .run.sh
1+ # https://github.com/MarcinKonowalczyk/run_sh
2+ # Bash script run by a keboard shortcut, called with rteh current file path $1
3+ # This is intended as an exmaple, but also contains a bunch of useful path partitions
4+ # Feel free to delete everything in
35echo " Hello from run script! ^_^"
46
57# The direcotry of the main project from which this script is running
@@ -22,10 +24,7 @@ ROOTFOLDER="${1##*$ROOT/}" && ROOTFOLDER="${ROOTFOLDER%%/*}" # folder in the roo
2224# Echo of path variables
2325# VERBOSE=true
2426VERBOSE=false
25-
26- if [ " $FILEFOLDER " = " .vscode" ] && [ " $FILENAME " = " run.sh" ]; then
27- VERBOSE=true
28- fi
27+ [ " $FILEFOLDER " = " .vscode" ] && [ " $FILENAME " = " run.sh" ] && VERBOSE=true
2928
3029if $VERBOSE ; then
3130 # https://stackoverflow.com/a/5947802/2531987
You can’t perform that action at this time.
0 commit comments