about summary refs log tree commit diff
path: root/Functions/Example
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-08-09 22:08:38 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-08-09 22:08:38 +0000
commit2983ed3fb3301d1808ae04a3a04389e3cd3fde8a (patch)
treec9a1f5eecc55a14ca9949c6fb07a4c1c2d2bfc09 /Functions/Example
parent9c33cf443419b74c5769279f4f1043465b62f64b (diff)
downloadzsh-2983ed3fb3301d1808ae04a3a04389e3cd3fde8a.tar.gz
zsh-2983ed3fb3301d1808ae04a3a04389e3cd3fde8a.tar.xz
zsh-2983ed3fb3301d1808ae04a3a04389e3cd3fde8a.zip
22594: Attempt to fix some off-by-one errors for completion lists
that exactly fit the display width
Diffstat (limited to 'Functions/Example')
-rw-r--r--Functions/Example/pushd4
1 files changed, 4 insertions, 0 deletions
diff --git a/Functions/Example/pushd b/Functions/Example/pushd
index 965c774bf..bb020c0aa 100644
--- a/Functions/Example/pushd
+++ b/Functions/Example/pushd
@@ -2,6 +2,9 @@
 # pushd +/-n just lifts the selected element to the top of the stack
 # instead of just cycling the stack.
 
+local puid
+[[ -o pushdignoredups ]] && puid=1
+
 emulate -R zsh
 setopt localoptions
 
@@ -9,5 +12,6 @@ if [[ ARGC -eq 1 && "$1" == [+-]<-> ]] then
 	setopt pushdignoredups
 	builtin pushd ~$1
 else
+	[[ -n $puid ]] && setopt pushdignoredups
 	builtin pushd "$@"
 fi