Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: compctl -y problem.
- X-seq: zsh-workers 14481
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: compctl -y problem.
- Date: Fri, 25 May 2001 15:11:11 +0000
- Cc: Cesar Crusius <crusius@xxxxxxxxxxxxxxxxxxx>
- In-reply-to: <E15305g-0002SP-00@sevilla>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <E15305g-0002SP-00@sevilla>
On May 24, 11:44am, Cesar Crusius wrote:
} Subject: compctl -y problem.
}
} compctl -K project_changes -y '$change_descriptions' aecd
}
} When I press <Tab> after aecd, the table shows as expected, but the
} cursor does not return to where it should. It goes to one line below
} where I originally typed <Tab>.
I mocked up a test case for this and there seems to be something pretty
badly wrong with the -y option.
Here's the test case:
text80 () {
local x=''
repeat 8 x=1234567890$x
text=$x$'\n'$text
reply=($((++count))x80 $last)
last=($reply)
}
text70 () {
local x=''
repeat 7 x=1234567890$x
text=$x$'\n'$text
reply=($((++count))x80 $last)
last=($reply)
}
array () {
local x=''
repeat 8 x=1234567890$x
text=($x $text)
reply=($((++count))x80 $last)
last=($reply)
}
compctl -K text80 -y '$text' try80
compctl -K text70 -y '$text' try70
compctl -K array -y '$text' tryA
Before each test, initialze the globals:
count=0 text='' last=()
My results were as follows:
Completion after `try80' puts the cursor N-1 lines ABOVE the correct line,
where N is the number of lines in $text.
Completion after `try70' puts the cursor N-1 lines BELOW the correct line.
Completion after `tryA' puts the shell into an infinite loop; it has to
be killed with `kill -9' from another terminal.
I know Sven won't be thrilled about being asked to fix anything in the
old compctl code ... perhaps we should just remove the `-y' option, as
it's new since 3.0 anyway, and document the correct way to achieve the
same effect by using the new completion system (which, incidentally, I
don't know how to do ... `compadd -d' doesn't quite cut it).
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author