Last active
August 6, 2025 00:22
-
-
Save guersam/9fb7d62c84c033089fd5360ad9270cf7 to your computer and use it in GitHub Desktop.
Fish autocompletion for mill 1.0
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
# Mill completion for fish shell | |
# Ported from Mill's bash/zsh completion script | |
function __mill_completions | |
# Get current command line tokens | |
set -l tokens (commandline -opc) | |
set -l position (count $tokens) | |
# Get completions from mill and strip descriptions | |
if test -x ./mill | |
./mill --tab-complete $position $tokens 2>/dev/null | sed 's/ .*//' | |
else | |
mill --tab-complete $position $tokens 2>/dev/null | sed 's/ .*//' | |
end | |
end | |
# Register the completion | |
complete -c mill -f -a "(__mill_completions)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment