This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |