From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21088 invoked by alias); 17 Jan 2018 07:37:35 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 42292 Received: (qmail 8561 invoked by uid 1010); 17 Jan 2018 07:37:35 -0000 X-Qmail-Scanner-Diagnostics: from mail-it0-f41.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.214.41):SA:0(-1.9/5.0):. Processed in 2.260755 secs); 17 Jan 2018 07:37:35 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=7/L1U1fLeCRGwjq0SXpyrI3ZCyeeL6FYBghfBFnLr/E=; b=s7Uyqrn2u2rxsafTKY7AX5z6zgW9uo6U1d7Ri6ynqSVB2/Y5zgeOuRqpbYhj7oZZZA TQCkj4RLwGRQjX5PC0Un5J2mYk8mHgn5dw7vUN9VQjOEaBBH7ceDOXr6HvWrqHNz0wY/ V2wAAWzP5uOT8VLKfL9BIto+cWW5MRIpGoDC7T4ZjOBc/LumqAHfFtI3yWVY0JSDd0Qg 6trGhX/CLxfyT46WAFpTGraoWEAPj/3qONesYzwt2Ukh5UNVqvlrp32w5gwHkTHLzxcm B6N/wjaSOS2ntBi+iTU75sBmdny+D5lJHIhgJJGFLaj9wATcJQ6M3FKEUU0s8o4+jnYf MCMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=7/L1U1fLeCRGwjq0SXpyrI3ZCyeeL6FYBghfBFnLr/E=; b=drCe0fLG+Zcwev9ai+cUNytld29FNFLhNysUW7jAkjpHhAgioU7AxI1ceZWsVuk7ex YZbbwvItrFZyQOHNrTf/GE4T/fIyHfndsyR9A0IFIvUQXAWV+nhDTK55jYZwJSWDK6TX yPHQwz1r1ANe1n8gO/3g/QxA41Hm8aC0GqWc8hFQtulzB9YI2WcACFwB+reiT3O5RW5u gvR65BOoU23rIDkIHfp9iwXW4W8DsCpP9EwjncTAcPd6AaOTKc4LR1Hc6EQzcNbYdkU6 uK9lvsXMRYtgBnRp0JhuLG5BNZzKtLJTJXnWcd9Tnt0YsUryFn1azunn0dZCiitEKy0b M1cQ== X-Gm-Message-State: AKwxytcKwOaqBtGA7ZNNwOGQL4XtBS56JwgGb1h2WOwibc5mcsNoRePg JrZkTvy+yOmVNNYqqvd+lg6HigCv5Uc= X-Google-Smtp-Source: ACJfBovrShE/Hc0bqc7Ac2p2IKXSyZA/pmCnXmCxIHuhbytlNxyt833NLvXmJxOgcdcLilZOnh5i+g== X-Received: by 10.36.101.2 with SMTP id u2mr13959385itb.55.1516174649870; Tue, 16 Jan 2018 23:37:29 -0800 (PST) From: dana Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: [BUG] Completion menu order doesn't (always) respect locale Message-Id: <8EEE517F-5413-47EC-B114-7D2FD79ABCD7@dana.is> Date: Wed, 17 Jan 2018 01:37:28 -0600 To: zsh-workers@zsh.org X-Mailer: Apple Mail (2.3273) The way completion possibilities are sorted in the menu has been = bothering me, but i was inspired to actually look into it today when i noticed that = one particular command was being sorted the way i wanted. Here is an (abbreviated) example of the behaviour i see: % export LC_ALL=3DC % pgrep - -F -G -L -P -U -a -d -f -g -i -l -n -o -q -t -u -v -x % export LC_ALL=3Den_GB.UTF-8 % pgrep - -F -G -L -P -U -a -d -f -g -i -l -n -o -q -t -u -v -x % export LC_ALL=3DC % pkill - -F -G -L -P -U -a -f -g -i -n -o -q -t -u -v -x % export LC_ALL=3Den_GB.UTF-8 % pkill - -a -f -F -g -G -i -L -n -o -P -q -t -u -U -v -x pkill is doing what i want =E2=80=94 it respects my locale's collation = settings. pgrep is not =E2=80=94 it always uses C/ASCII sorting. The difference seems to be that pkill has 'grouped' options =E2=80=94 = i.e., multiple options with the same description. In this case, the grouped ones are = the names of the signals, which all have the description 'signal'. If you `unset signals` so that the function can't generate those options, pkill = loses its grouped options and it (mis)behaves like pgrep. I tracked this down as far as cd_prep(). When there are grouped options, = it calls eltpcmp(), which in turn calls strcoll(). When there AREN'T = grouped options... well, it doesn't do that. Had to stop looking there. The inconsistency affects many different completions. For example, ls = and top respect the locale, but ping and typeset do not. It's really irritating = now that i've noticed it. I might look into it more later, but maybe someone already has an idea = about it? In the mean time, to at least make them consistent, i can set = LC_COLLATE=3DC in _main_complete. dana