Skip to content

Instantly share code, notes, and snippets.

@kielmarj
Last active March 3, 2025 16:59
Show Gist options
  • Select an option

  • Save kielmarj/7fb5578bbd4347d3a97d0c07227ad975 to your computer and use it in GitHub Desktop.

Select an option

Save kielmarj/7fb5578bbd4347d3a97d0c07227ad975 to your computer and use it in GitHub Desktop.
Load fish shell function descriptions on shell start for tab completions. Add to config.fish
# Load fish shell function descriptions on shell start. Add to `config.fish`.
function describe_functions --description "Load function descriptions for tab completions"
    set -f output ""
    for file in $fish_function_path/*.fish
        set -f cmd (basename $file .fish)
        set -f desc (functions -Dv $cmd)[5]
        set -a output "`$cmd`: $desc"
    end
    printf '%s\n' $output | sort -d
end
describe_functions 2&>/dev/null

Repo: fish-files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment