From 26e4c1fd20ea250cb1a17cd18edcfeb66f34ba42 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 17 Jul 2023 14:54:46 -0700 Subject: feat(watch): watch command --- src/bashly.yml | 11 +++++++++++ src/watch_command.sh | 5 +++++ 2 files changed, 16 insertions(+) create mode 100644 src/watch_command.sh diff --git a/src/bashly.yml b/src/bashly.yml index 17d99ae..2a83181 100644 --- a/src/bashly.yml +++ b/src/bashly.yml @@ -34,6 +34,17 @@ commands: - name: search repeatable: true + - name: watch + alias: w + dependencies: [ani-cli] + args: + - name: search + repeatable: true + + flags: + - long: --dub + short: -d + - name: x dependencies: [xdg-open, curl, echo, tr, jq] diff --git a/src/watch_command.sh b/src/watch_command.sh new file mode 100644 index 0000000..9fd039d --- /dev/null +++ b/src/watch_command.sh @@ -0,0 +1,5 @@ +if [ -n "${args[--dub]}" ]; then + ani-cli --dub "$(array_to_string "${args[search]}")" +else + ani-cli "$(array_to_string "${args[search]}")" +fi -- cgit v1.2.3