mirror of
https://github.com/token2/snapd.git
synced 2026-03-13 11:15:47 -07:00
Snapd installs bash completion files from snaps in `/usr/share/bash-completion/completions` which in some distributions is a read-only filesystem. Instead of installing them in `/usr` we can install them within `/var/lib/snapd` which should always be writable. Because `/var/lib/snapd/desktop` is already in `XDG_DATA_DIRS`, we can save the files there. Because bash-completion 2.1 and prior do not support `XDG_DATA_DIRS`, on older distributions, the legacy path `/usr/share/bash-completion/completions` will still be used.
9 lines
269 B
Plaintext
9 lines
269 B
Plaintext
export TERM=ansi
|
|
export PS1='prompt$ '
|
|
export XDG_DATA_DIRS="${XDG_DATA_DIRS:-}${XDG_DATA_DIRS:+:}/var/lib/snapd/desktop"
|
|
|
|
# This removes escape bracket characters that clutter outputs
|
|
bind 'set enable-bracketed-paste off'
|
|
|
|
. /usr/share/bash-completion/bash_completion
|