From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.dk
Cc: Cesar Crusius <crusius@barcelonadesign.com>
Subject: Re: compctl -y problem.
Date: Fri, 25 May 2001 15:11:11 +0000 [thread overview]
Message-ID: <1010525151112.ZM14441@candle.brasslantern.com> (raw)
In-Reply-To: <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
next parent reply other threads:[~2001-05-25 15:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E15305g-0002SP-00@sevilla>
2001-05-25 15:11 ` Bart Schaefer [this message]
2001-05-25 16:35 ` Bart Schaefer
2001-05-28 11:39 ` Sven Wischnowsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1010525151112.ZM14441@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--cc=crusius@barcelonadesign.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).