Skip to content

Commit 5fc2c69

Browse files
committed
update one-liner and todos
1 parent 55ce27a commit 5fc2c69

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff 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"
1414
curl $SOURCE > .vscode/run.sh
1515
chmod 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
2727
cd ~
2828
mkdir test
2929
cd 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
3131
touch hi.txt
3232
code hi.txt
3333
```
@@ -47,7 +47,8 @@ EXTENSION : sh # just the extension of the current file
4747
ROOTFOLDER : <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)

run.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
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
35
echo "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
2426
VERBOSE=false
25-
26-
if [ "$FILEFOLDER" = ".vscode" ] && [ "$FILENAME" = "run.sh" ]; then
27-
VERBOSE=true
28-
fi
27+
[ "$FILEFOLDER" = ".vscode" ] && [ "$FILENAME" = "run.sh" ] && VERBOSE=true
2928

3029
if $VERBOSE; then
3130
# https://stackoverflow.com/a/5947802/2531987

0 commit comments

Comments
 (0)