From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SDmLG8sCsWIMLgAAbAwnHQ (envelope-from ) for ; Tue, 21 Jun 2022 01:29:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id oBOBG8sCsWILGAEA9RJhRA (envelope-from ) for ; Tue, 21 Jun 2022 01:29:15 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F32ACEBE4 for ; Tue, 21 Jun 2022 01:29:14 +0200 (CEST) Received: from localhost ([::1]:56732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3QpV-0001y2-PR for larch@yhetil.org; Mon, 20 Jun 2022 19:29:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3QpJ-0001vO-VY for bug-guix@gnu.org; Mon, 20 Jun 2022 19:29:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36480) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o3QpJ-0007x3-Ng for bug-guix@gnu.org; Mon, 20 Jun 2022 19:29:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o3QpJ-0001kH-J2 for bug-guix@gnu.org; Mon, 20 Jun 2022 19:29:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#51466: bug#53355: bug#51466: bug#53355: guix shell --check: confusing error message Resent-From: Bengt Richter Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 20 Jun 2022 23:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51466 X-GNU-PR-Package: guix X-GNU-PR-Keywords: moreinfo To: Chris Marusich Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 53355@debbugs.gnu.org, 51466@debbugs.gnu.org Received: via spool by 51466-submit@debbugs.gnu.org id=B51466.16557676956649 (code B ref 51466); Mon, 20 Jun 2022 23:29:01 +0000 Received: (at 51466) by debbugs.gnu.org; 20 Jun 2022 23:28:15 +0000 Received: from localhost ([127.0.0.1]:58608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o3QoY-0001jB-O7 for submit@debbugs.gnu.org; Mon, 20 Jun 2022 19:28:15 -0400 Received: from mailout.easymail.ca ([64.68.200.34]:55554) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o3QoX-0001it-93; Mon, 20 Jun 2022 19:28:14 -0400 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 00FE4E18EC; Mon, 20 Jun 2022 23:28:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bokr.com; s=easymail; t=1655767688; bh=y/AVj3jHEaRiHQFmOoPWgD3JO3fvfxlCrHiiK3lAiYE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=afvzZ2fKsLgk+SNJfaV33UG26+2WTrpCMO+RwIOogWf84gCHDMG9617Zaby22b/tS RUUc1KbJck07R3rrEQD7b4iBK5K3fIx1oOCfnyrPZKtqmtmWD7EGCnG/zt/9nSE1qn cVyb2fuR9TgK4Qf/n/YuheBoRHnuhIs2u52jyfy5GP9IkBK4ICEMS75EuhTHgqRMSb MXS2vwsLvrYHBXNXZDYT7Tsy4L3KdJFwcNhKczWY6Y3GDEdb6/KMUjNq9s9v/theBk 6L3upC8inVq9Da2Lwujku3GyWWpJECuxhGfWzR3eHSGXo7kUhJ7x2Qo+nVNpfJ9a+L 9RKl5po2buN0Q== X-Virus-Scanned: Debian amavisd-new at emo08-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo08-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SfhCD5X62uk3; Mon, 20 Jun 2022 23:28:07 +0000 (UTC) Received: from localhost (m83-185-37-85.cust.tele2.se [83.185.37.85]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 3FD53E18EB; Mon, 20 Jun 2022 23:28:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bokr.com; s=easymail; t=1655767687; bh=y/AVj3jHEaRiHQFmOoPWgD3JO3fvfxlCrHiiK3lAiYE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eJO2Q2sHObVZkoDqR3a+OE9gn8hqdeVCNs5rJysRoelVaz6GK81x7cxWxr6c8870M ghSUkd07xvOjQtcHzOQoDJvxKUCIlczYfep/BoYEmuTcFdDFPOX3Tl8PSFDvJzd1qi SJ+uXOYJgmaFc8Ca50hbzVN7DzCFacqvxbeJwhsz4fChxBIW0mGHl6pRFPDuXALyWL 5lr/Zr82ACXqu8BemleckZNC7AFvBtRti3/uq/c2xPgvBkiVl3w4MkyqjFuHJWG4gh ezfo7C3Ws8yqqRYQFS3w17HqFYCv2tuXGW8Og9p0erLjRTtWdhXgvbjK8YlX5Zuqbu q4fZnuw+8Fjww== Date: Tue, 21 Jun 2022 01:27:49 +0200 From: Bengt Richter Message-ID: <20220620232749.GA25854@LionPure> References: <87h79slysd.fsf@gnu.org> <87sft13dyv.fsf@gmail.com> <874k59d802.fsf@gnu.org> <87wnhy2w73.fsf_-_@gmail.com> <878rudzsmv.fsf@gnu.org> <87sfozzglf.fsf_-_@gmail.com> <871qvsubgv.fsf@gnu.org> <87k09cpest.fsf@gmail.com> <20220620101210.GA19777@LionPure> <20220620175656.GA24590@LionPure> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220620175656.GA24590@LionPure> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1655767755; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=1o5CNg3S8YLWQRJe6qJwvdiHWtf+J/RGqeIui5mLDS8=; b=fUofTreqIz89tDN978+Yir5FXU3fH3qKhAXVY2Tserphou2xr8OCxUurbGlgP5p1Y0GJJ1 5hzJ21OxBYzRC96sQrV/cqkhajkOtxDLIidUE4qQg70T65UCaKZUZs+btsc+WTBTGx8e64 mgH4Ck8Dgx4zLgKw+y2HjyzC/+27T/rzaiCc/gLI2CTOgPhI+Qnsxb6pWXVtrFb0c8UwrN /KAzBjQRA8hQJGaH4KnhILkyHdGy78k/VjnetNLWlZ5TYimw9koGSKxHnHKf3QnHE0IihO Svx4Xqio66dTNpnqWgzN8ahsRxQFHstPkxbgMN+BV31hQ4CI9gZL5sL3vmK+/g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655767755; a=rsa-sha256; cv=none; b=u07sot0c6zEXafRT3zEmNDfHSe8W6vSO2Z7xBAzjm+IJ5KutzKLLDZvZaUOUJmgmCPBPb+ 2Lizs3iMU5tXWHDsJIuErtGIGh9exylP1yr4KnYVOJk+r0mlahrdrS0BmfDVuhPAcGfAch 7IeCz84RZsEm7taCGtG30ZoPIIZIpabmLeDqwYx+PB8fq6JvM6nA4EOB5DwZKCKAkYBVE0 c/fBB9r+dEXRNhL7qtwt3iSumK4IdzNsqZ4g0xqZ2z7fA04Px9ZZErkWjYvQrN9gGApYw8 405yQ3f6VyOBWLNcVbW9F8+YFthbYqxNzLCNGp/wfwkhAUs6layqTp9mZzE+iA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=bokr.com header.s=easymail header.b=afvzZ2fK; dkim=fail ("headers rsa verify failed") header.d=bokr.com header.s=easymail header.b=eJO2Q2sH; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 0.73 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=bokr.com header.s=easymail header.b=afvzZ2fK; dkim=fail ("headers rsa verify failed") header.d=bokr.com header.s=easymail header.b=eJO2Q2sH; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: F32ACEBE4 X-Spam-Score: 0.73 X-Migadu-Scanner: scn0.migadu.com X-TUID: mhwH+Jd5d13V Sorry again, but I found the source: tl;dr: These functions are defined in /usr/share/bash-completion/bash_completion which looks awful kludgey to me, (however clever :) There is a reference to http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00155.html in the header comments for _quote_readline_by_ref () I also found https://askubuntu.com/questions/571544/bash-tab-completion-bash-unexpected-eof-while-looking-for-matching-bash My bet is there is at least one bug active now. Completion is really nice when it works, but IMO they certainly shouldn't use a name like unadorned ``quote'' in their implementation. And I think it would be prettier in scheme :) Lots could be prettier if bash could be extended with scheme. I'm about out of time to chase this, but I expect to bump into it again ;/ HTH. -- Regards, Bengt Richter On +2022-06-20 19:56:56 +0200, Bengt Richter wrote: > Sorry to reply to myself, but forgot to illustrate. > > On +2022-06-20 12:12:10 +0200, bokr@bokr.com wrote: > > Hi Chris, > [...] > > > > I have had some mystery bash parsing errors, and I noticed > > set|less > > shows a heck of a lot of functions defined that I don't > > remember seeing in the past. > > Anyway, shouldn't stuff like that have better hygiene than just prefixed > > _underscore ? Or maybe set|less doesn't show all that on your system? > > > > There are a couple functions without prefixed underscore too, > which invoke some underscore-prefixed ones that look too trusting > of their arguments if you ask me: can someone declare these safe? > > I think I can grok quote () ... > (escape single quotes and enclose result in single quotes, trusting bash state) > But what if I want to define my own function quote?? How would I know I was > overriding this? I really don't like my programming space occupied by unknowns :-( > > --8<---------------cut here---------------start------------->8--- > quote () > { > local quoted=${1//\'/\'\\\'\'}; > printf "'%s'" "$quoted" > } > --8<---------------cut here---------------end--------------->8--- > > but this one below will take more time than I want to spend on code > I'm not intentionally going to use, and which invites name clashes > in my command name space :-( > > --8<---------------cut here---------------start------------->8--- > quote_readline () > { > local quoted; > _quote_readline_by_ref "$1" ret; > printf %s "$ret" > } > --8<---------------cut here---------------end--------------->8--- > > where the above calls this: > > --8<---------------cut here---------------start------------->8--- > _quote_readline_by_ref () > { > if [ -z "$1" ]; then > printf -v $2 %s "$1"; > else > if [[ $1 == \'* ]]; then > printf -v $2 %s "${1:1}"; > else > if [[ $1 == ~* ]]; then > printf -v $2 ~%q "${1:1}"; > else > printf -v $2 %q "$1"; > fi; > fi; > fi; > [[ ${!2} == \$* ]] && eval $2=${!2} > } > --8<---------------cut here---------------end--------------->8--- > > HTH somehow. > -- > Regards, > Bengt Richter > > >