zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Jun T <takimoto-j@kba.biglobe.ne.jp>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH] avoid localized output from external commands in a few completion
Date: Wed, 27 Dec 2017 23:15:40 +0000	[thread overview]
Message-ID: <20171227231540.pnva2rdjaptbmhzd@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <CB3990CA-11C1-491F-BDD4-0383B63681E5@kba.biglobe.ne.jp>

Jun T wrote on Wed, Dec 27, 2017 at 20:51:30 +0900:
> +++ b/Doc/Zsh/compsys.yo
> @@ -4299,6 +4311,18 @@ This function completes words that are valid at command position: names of
> +item(tt(_comp_locale))(
> +This function resets all the locale categories other than tt(LC_CTYPE) to
> +`tt(C)' so that the output from external commands can be easily analyzed by
> +the completion system. tt(LC_CTYPE) retains the current value (either
> +explicitly set or inherited from tt(LC_ALL) or tt(LANG)), ensuring that
> +non-ASCII characters in file names are still handled properly.
> +

Thanks for adding this!

One comment: the language "inherited" could be confusing in this usage.
(Normally inheritance works from a parent class to a subclass, but here LC_ALL
and LANG are a parent and a child of LC_CTYPE.)  How about, for example:

diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index a0e99f2e4..336a7ec37 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -4315,8 +4315,8 @@ findex(_comp_locale)
 item(tt(_comp_locale))(
 This function resets all the locale categories other than tt(LC_CTYPE) to
 `tt(C)' so that the output from external commands can be easily analyzed by
-the completion system. tt(LC_CTYPE) retains the current value (either
-explicitly set or inherited from tt(LC_ALL) or tt(LANG)), ensuring that
+the completion system. tt(LC_CTYPE) retains the current value (taking
+tt(LC_ALL) and tt(LANG) into account), ensuring that
 non-ASCII characters in file names are still handled properly.
 
 This function should normally be run only in a subshell, because the new

Cheers,

Daniel

> +This function should normally be run only in a subshell, because the new
> +locale is exported to the environment. Typical usage would be
> +`tt($LPAR()_comp_locale; )var(command) ...tt(RPAR())'.
> +)
>  findex(_completers)
>  item(tt(_completers) [ tt(-p) ])(
>  This function completes names of completers.
> 
> 
> 
> 
> 


  reply	other threads:[~2017-12-27 23:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-25 23:40 Jun T.
2017-12-26  1:04 ` Bart Schaefer
2017-12-26  1:19   ` Daniel Shahaf
2017-12-26  4:47     ` Jun T
2017-12-26  4:59       ` Jun T
2017-12-26 10:52         ` Jun T
2017-12-27 11:51           ` Jun T
2017-12-27 23:15             ` Daniel Shahaf [this message]
2017-12-28  2:54               ` Jun T
2017-12-26  5:24       ` Daniel Shahaf

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=20171227231540.pnva2rdjaptbmhzd@tarpaulin.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@zsh.org \
    /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).