From: Hannu Koivisto <azure@iki.fi>
To: Zsh Users' List <zsh-users@sunsite.dk>
Subject: Superfluous CRs trouble completion routines in Cygwin
Date: Sat, 15 Oct 2005 13:47:07 +0300 [thread overview]
Message-ID: <87irvzys44.fsf@trews52.bothi.fi> (raw)
Greetings,
I recently needed to use Perforce both in Windows and Linux (zsh
4.2.4 and 4.2.5, respectively). Completion worked fine in Linux
but in Windows p4 <tab> caused just an odd "display glitch" instead
of producing a list of p4 commands and their descriptions. I
immediately suspected that the completion code runs p4 to generate
the completions and is somehow affected by the carriage returns at
the end of lines. And indeed, when I added hline[-1]=${hline[-1]%^M}
to the loop
_perforce_call_p4 help-commands help commands | while read -A hline; do
...
done
the problem disappeared.
That loop collects the commands and their descriptions into an
array which is later passed to _describe. My modification of
course fixed this particular case, but I can't help thinking there
must be other similar cases in _perforce and probably other
completion functions. I wonder if it made sense to make the "core"
completion functions such as _describe more tolerant to CRs instead
of modifying application-specific completion functions? Or can you
think of other, better ways of getting rid of the problem for good?
--
Hannu
next reply other threads:[~2005-10-16 7:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-15 10:47 Hannu Koivisto [this message]
2005-10-15 18:02 ` Bart Schaefer
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=87irvzys44.fsf@trews52.bothi.fi \
--to=azure@iki.fi \
--cc=zsh-users@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).