Skip to content

Instantly share code, notes, and snippets.

@NijeboerFrank
NijeboerFrank / todo.sh.fish
Last active March 9, 2024 22:28
Fish completions for todo.txt-cli
#!/bin/fish
# Place this file into ~/.config/fish/completions or another completions directory
# https://fishshell.com/docs/current/completions.html#where-to-put-completions
# List the help page
set __todo_txt_help_output (todo.sh help)
# Commands
set -l todo_commands (string match -r '^\s{4}([[:lower:]]+).*$' -g $__todo_txt_help_output)
set -l commands_descriptions (string match -r '^\s{4}(\w+[[:ascii:]]+).*$' -g $__todo_txt_help_output)