From 2983ed3fb3301d1808ae04a3a04389e3cd3fde8a Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 9 Aug 2006 22:08:38 +0000 Subject: 22594: Attempt to fix some off-by-one errors for completion lists that exactly fit the display width --- Functions/Example/pushd | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Functions/Example/pushd') 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 -- cgit 1.4.1