reminders-cli icon indicating copy to clipboard operation
reminders-cli copied to clipboard

For anyone interested: Fish autocompletions for reminders-cli

Open kontza opened this issue 2 years ago • 2 comments

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"

kontza avatar May 30 '23 05:05 kontza

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

keith avatar May 30 '23 16:05 keith

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: @.***>

kontza avatar Jun 01 '23 05:06 kontza