| 1 |
Fish Plugin |
| 2 |
=========== |
| 3 |
|
| 4 |
The ``fish`` plugin adds a ``beet fish`` command that creates a `Fish shell`_ |
| 5 |
tab-completion file named ``beet.fish`` in ``~/.config/fish/completions``. This |
| 6 |
enables tab-completion of ``beet`` commands for the `Fish shell`_. |
| 7 |
|
| 8 |
.. _fish shell: https://fishshell.com/ |
| 9 |
|
| 10 |
Configuration |
| 11 |
------------- |
| 12 |
|
| 13 |
Enable the ``fish`` plugin (see :ref:`using-plugins`) on a system running the |
| 14 |
`Fish shell`_. |
| 15 |
|
| 16 |
Usage |
| 17 |
----- |
| 18 |
|
| 19 |
Type ``beet fish`` to generate the ``beet.fish`` completions file at: |
| 20 |
``~/.config/fish/completions/``. If you later install or disable plugins, run |
| 21 |
``beet fish`` again to update the completions based on the enabled plugins. |
| 22 |
|
| 23 |
For users not accustomed to tab completion… After you type ``beet`` followed by |
| 24 |
a space in your shell prompt and then the ``TAB`` key, you should see a list of |
| 25 |
the beets commands (and their abbreviated versions) that can be invoked in your |
| 26 |
current environment. Similarly, typing ``beet -<TAB>`` will show you all the |
| 27 |
option flags available to you, which also applies to subcommands such as ``beet |
| 28 |
import -<TAB>``. If you type ``beet ls`` followed by a space and then the and |
| 29 |
the ``TAB`` key, you will see a list of all the album/track fields that can be |
| 30 |
used in beets queries. For example, typing ``beet ls ge<TAB>`` will complete to |
| 31 |
``genres:`` and leave you ready to type the rest of your query. |
| 32 |
|
| 33 |
Options |
| 34 |
------- |
| 35 |
|
| 36 |
In addition to beets commands, plugin commands, and option flags, the generated |
| 37 |
completions also include by default all the album/track fields. If you only want |
| 38 |
the former and do not want the album/track fields included in the generated |
| 39 |
completions, use ``beet fish -f`` to only generate completions for beets/plugin |
| 40 |
commands and option flags. |
| 41 |
|
| 42 |
If you want generated completions to also contain album/track field *values* for |
| 43 |
the items in your library, you can use the ``-e`` or ``--extravalues`` option. |
| 44 |
For example: ``beet fish -e genre`` or ``beet fish -e genre -e albumartist`` In |
| 45 |
the latter case, subsequently typing ``beet list genres: <TAB>`` will display a |
| 46 |
list of all the genres in your library and ``beet list albumartist: <TAB>`` will |
| 47 |
show a list of the album artists in your library. Keep in mind that all of these |
| 48 |
values will be put into the generated completions file, so use this option with |
| 49 |
care when specified fields contain a large number of values. Libraries with, for |
| 50 |
example, very large numbers of genres/artists may result in higher memory |
| 51 |
utilization, completion latency, et cetera. This option is not meant to replace |
| 52 |
database queries altogether. |
| 53 |
|
| 54 |
By default, the completion file will be generated at |
| 55 |
``~/.config/fish/completions/``. If you want to save it somewhere else, you can |
| 56 |
use the ``-o`` or ``--output`` option. |