tree: e9b424aecf06a0f0de2f7edc2c83a43227fb875f [path history] [tgz]
  1. README.md
  2. fx.fish
scripts/fish/completions/README.md

Fish Completion

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

Use

Sourcing the fx-env.fish will load completions for you:

source ~/fuchsia/scripts/fx-env.fish

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 fx.fish file:

touch $FUCHSIA_DIR/scripts/fish/completions/fx.fish

Advanced Usage

If you wish to use only the fx.fish file and avoid sourcing ~/fuchsia/scripts/fx-env.fish 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 fx.fish 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/fx.sh ~/.config/fish/completions/