bin/open-editor: Added checks if VS Code is there
Signed-off-by: Andrei Jiroh Eugenio Halili <andreijiroh@madebythepins.tk>
This commit is contained in:
parent
8f9f37af76
commit
ed6807c396
|
@ -0,0 +1,13 @@
|
|||
#!/bin/env bash
|
||||
|
||||
VSCODE_PATH=$(command -v code)
|
||||
NANO_PATH=$(command -v code)
|
||||
VI_PATH=$(command -v code)
|
||||
|
||||
if [[ $VSCODE_PATH != "" ]]; then
|
||||
code --wait $1
|
||||
elif [[ $NANO_PATH != "" ]]; then
|
||||
nano $1
|
||||
else
|
||||
vi $1
|
||||
fi
|
Loading…
Reference in New Issue