diff options
Diffstat (limited to 'artix/home/.local/bin/edit')
| -rwxr-xr-x | artix/home/.local/bin/edit | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/artix/home/.local/bin/edit b/artix/home/.local/bin/edit new file mode 100755 index 0000000..c6f8288 --- /dev/null +++ b/artix/home/.local/bin/edit @@ -0,0 +1,10 @@ +#! /bin/sh + +eval TARGET_FILE=$(cat ~/.local/share/dox/quickconfig | grep "#$1\$$" | awk -F "#" '{print $1}') + +if [ "$TARGET_FILE" != "" ]; then + nvim $TARGET_FILE +else + echo "Unknown config file. Use one below :" + grep -o "#.*\$$" ~/.local/share/dox/quickconfig | tr -d '#' | tr -d '$' +fi |
