tree: e9b424aecf06a0f0de2f7edc2c83a43227fb875f [path history] [tgz]

Fish Completion

Fish completion support for the fx tool. Subcommands, their short and long options and descriptions for both are parsed from help documentation.


Sourcing the will load completions for you:

source ~/fuchsia/scripts/

Completion Cache

First attempt at fx tab completion will hang while completions are generated. Subsequent tab completions will be fast as they are cached by fish. If you wish to regenerate this cache open a new shell or touch the file:

touch $FUCHSIA_DIR/scripts/fish/completions/

Advanced Usage

If you wish to use only the file and avoid sourcing ~/fuchsia/scripts/ you can do the following:

  1. Set $FUCHSIA_DIR to your fuchsia tree location. This can be done with a universal environment variable.
set -U FUCHSIA_DIR $HOME/fuchsia
  1. Add to any completion directory as described in the fish manual. Valid locations are contained in the $fish_complete_path variable.

For example:

mkdir -p ~/.config/fish/completions/
ln -s ~/fuchsia/scripts/fish/completions/ ~/.config/fish/completions/