Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kontza opened this issue May 30, 2023 · 2 comments
Open

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

kontza opened this issue May 30, 2023 · 2 comments

Comments

@kontza
Copy link

kontza commented May 30, 2023

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
Copy link
Owner

keith commented May 30, 2023

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
Copy link
Author

kontza commented Jun 1, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants