Add support for notes.sh
This commit is contained in:
parent
5e8865e779
commit
c4dba18172
1 changed files with 22 additions and 0 deletions
22
q-notes
Executable file
22
q-notes
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
NOTES_SH="$(which notes.sh)"
|
||||||
|
|
||||||
|
if [[ -z "$@" ]]; then
|
||||||
|
echo "^n .*$"
|
||||||
|
elif [[ "$1" == "--hint" ]]; then
|
||||||
|
shift
|
||||||
|
elif [[ "$1" == "--complete" ]]; then
|
||||||
|
shift
|
||||||
|
notes.sh -l | awk '{printf("%s n", $1); for (i=2; i<=NF; i++) printf(" %s", $i); print("");}'
|
||||||
|
elif [[ "$1" == "--preview" ]]; then
|
||||||
|
shift
|
||||||
|
notes.sh -p "$1"
|
||||||
|
elif [[ "$1" == "--run" ]]; then
|
||||||
|
shift
|
||||||
|
setsid -f foot "$NOTES_SH" -e "$1"
|
||||||
|
else
|
||||||
|
echo "Unexpected arguments: $@"
|
||||||
|
fi
|
Loading…
Reference in a new issue