keith / reminders-cli

A simple CLI for interacting with macOS reminders
MIT License
663 stars 52 forks source link

For anyone interested: Fish autocompletions for reminders-cli #61

Open kontza opened 1 year ago

kontza commented 1 year ago
for LINE in (reminders -h|awk '/^SUBCOMMANDS/{flag=1;next}/^ *$/{flag=0}flag')
    set -l COMMAND (echo $LINE|cut -w -f2)
    set -l DESCR (echo $LINE|cut -w -f3-)
    complete -c reminders -a $COMMAND -d "$DESCR"
end
set -l REMINDER_COMMANDS (reminders -h|awk 'BEGIN {ORS=" "}/^SUBCOMMANDS/{flag=1;next}/^ *$/{flag=0}flag{print $1}'|xargs)
set -l REMINDER_LISTS (reminders show-lists|sed -e 's:^:":' -e 's:$:":')
complete -c reminders -n "__fish_seen_subcommand_from $REMINDER_COMMANDS" -a "$REMINDER_LISTS"
keith commented 1 year ago

thanks! If you want to submit those we can package them in the homebrew release too, you can see how it works today with the provided zsh completions

kontza commented 1 year ago

Sure, I'll do that.

On Tue, May 30, 2023 at 7:25 PM Keith Smiley @.***> wrote:

thanks! If you want to submit those we can package them in the homebrew release too, you can see how it works today with the provided zsh completions

— Reply to this email directly, view it on GitHub https://github.com/keith/reminders-cli/issues/61#issuecomment-1568727903, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASRRCCX7ZTFHOW3DIIDNJ3XIYNN7ANCNFSM6AAAAAAYTO2Z6M . You are receiving this because you authored the thread.Message ID: @.***>