Completionsยค
Completions are available for the fish shell.
If your CLI is available from the command line as foo, then add the following to ~/.config/fish/completions/foo.fish:
foo --completions fish | source
Completions are generated based on type annotations:
Literal[...]will suggest the provided values.seali.Dirmay be wrapped around astrorpathlib.Pathto perform file-based completions:seali.Dir[str/pathlib.Path, pathlib.Path(path) / to / folder]will suggest the files/folders in that directory as completions.seali.Dir[str/pathlib.Path, None]will suggest any file/folder as completions.
Unions will suggest the union of the completions of their components.seali.NoCompletemay be wrapped around an annotation to suppress completions. For exampleFoo | NoComplete[Bar]will suggest whatever completions come fromFoowithout suggesting those that come fromBar.