about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_unison4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 943bfe1d4..72aba5023 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
 	* github #46: Completion/Unix/Command/_git: _git-restore:
diff --git a/Completion/Unix/Command/_unison b/Completion/Unix/Command/_unison
index 2a3333742..d8cf7458f 100644
--- a/Completion/Unix/Command/_unison
+++ b/Completion/Unix/Command/_unison
@@ -86,7 +86,7 @@ _arguments \
 if [[ $state == profile ]]; then
     local -a profiles
 
-    profiles=( ~/.unison/*.prf(N) )
+    profiles=( ${UNISON:-~/.unison}/*.prf(N) )
     (( $#profiles )) && \
-	compadd "$@" - ${${profiles#~/.unison/}%.prf}
+	compadd "$@" - ${${profiles#${UNISON:-~/.unison}/}%.prf}
 fi