mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-04 10:41:11 +02:00
45646: completion: Unison: Honour the $UNISON variable
By default Unison uses the ~/.unison directory to store its cache and profiles. However, this location is configurable through the $UNISON environment variable. Quoting from the manual [1]: > If the environment variable UNISON is defined, then its value will be > used as the name of this directory. This patch enables users to move the .unison directory and still enjoy zsh completion for profiles. [1] https://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html#unisondir
This commit is contained in:
parent
a6610c4a17
commit
83f7dc7806
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2020-03-29 Henri Menke <henri@icp.uni-stuttgart.de>
|
||||||
|
|
||||||
|
* 45646: Completion/Unix/Command/_unison: completion: Unison:
|
||||||
|
Honour the $UNISON variable
|
||||||
|
|
||||||
2020-03-28 Gastón Haro <gaston.haro@fing.edu.uy>
|
2020-03-28 Gastón Haro <gaston.haro@fing.edu.uy>
|
||||||
|
|
||||||
* github #46: Completion/Unix/Command/_git: _git-restore:
|
* github #46: Completion/Unix/Command/_git: _git-restore:
|
||||||
|
|
|
@ -86,7 +86,7 @@ _arguments \
|
||||||
if [[ $state == profile ]]; then
|
if [[ $state == profile ]]; then
|
||||||
local -a profiles
|
local -a profiles
|
||||||
|
|
||||||
profiles=( ~/.unison/*.prf(N) )
|
profiles=( ${UNISON:-~/.unison}/*.prf(N) )
|
||||||
(( $#profiles )) && \
|
(( $#profiles )) && \
|
||||||
compadd "$@" - ${${profiles#~/.unison/}%.prf}
|
compadd "$@" - ${${profiles#${UNISON:-~/.unison}/}%.prf}
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue