summaryrefslogtreecommitdiff
path: root/doc/bash_completion.txt
blob: e67f98bc3af0467db860a8b09d633235b39159a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Bash completion
===============

Configuration files
-------------------

*$BASH_COMPLETION_USER_FILE*::
    Sourced late by bash_completion, pretty much after everything else.
    Use this file for example to load additional completions, and to remove
    and override ones installed by bash_completion. Defaults to
    `~/.bash_completion` if unset or null.

*$XDG_CONFIG_HOME/bash_completion*::
    Sourced by the bash_completion.sh profile.d script.  This file is
    suitable for definitions of all `COMP_*` environment variables
    below.  If `$XDG_CONFIG_HOME` is unset or null, `~/.config` is
    used instead of it.

Environment variables
---------------------

*BASH_COMPLETION_COMPAT_DIR*::
    Directory for pre-dynamic loading era (pre-2.0) backwards compatibility
    completion files that are loaded eagerly from `bash_completion` when it is
    loaded. If unset or null, the default compatibility directory to use is
    `/etc/bash_completion.d`.

*COMP_CONFIGURE_HINTS*::
    If set and not null, `configure` completion will return the entire option
    string (e.g.  `--this-option=DESCRIPTION`) so one can see what kind of data
    is required and then simply delete the descriptive text and add one's own
    data.  If unset or null (default), `configure` completion will strip
    everything after the '=' when returning completions.

*COMP_CVS_REMOTE*::
    If set and not null, `cvs commit` completion will try to complete on
    remotely checked-out files.  This requires passwordless access to the
    remote repository.  Default is unset.

*COMP_FILEDIR_FALLBACK*::
    If set and not null, completions that look for filenames based on their
    "extensions" will fall back to suggesting all files if there are none
    matching the sought ones.

*COMP_IWLIST_SCAN*::
    If set and not null, `iwconfig` completion will try to complete on
    available wireless networks identifiers.  Default is unset.

*COMP_KNOWN_HOSTS_WITH_HOSTFILE*::
    If set and not null (default), known hosts completion will complement
    hostnames from ssh's known_hosts files with hostnames taken from the file
    specified by the HOSTFILE shell variable (compgen -A hostname). If null,
    known hosts completion will omit hostnames from HOSTFILE.  Omitting
    hostnames from HOSTFILE is useful if HOSTFILE contains many entries for
    local web development or ad-blocking.

*COMP_KNOWN_HOSTS_WITH_AVAHI*::
    If set and not null, known hosts completion will try to use `avahi-browse`
    for additional completions.  This may be a slow operation in some setups.
    Default is unset.

*COMP_TAR_INTERNAL_PATHS*::
    If set and not null *before* sourcing bash_completion, `tar` completion
    will do correct path completion for tar file contents.  If unset or null,
    `tar' completion will do correct completion for paths to tar files.  See
    also README.