From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9953 invoked by alias); 16 Aug 2015 01:22:51 -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: X-Seq: 36188 Received: (qmail 14913 invoked from network); 16 Aug 2015 01:22:51 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=S6hMm0A54SVQ5waL9e6aLJhA0mAs5hg3GYcNH0HqUAs=; b=QxcuOHWjrTG6NxbwSPOjO4IdI0lLAgTNBlKbzm1fZHGbp03MU/MATDz7eM+3pzz5gI RiFHqk/6mk67FYqPRkLYuQCoPhgiKxOUitF+zl5KCvcmQEJUxyzcEUkl40rNu9JxGNiI mACXwwX6W6X7MlvqmWcMaSetw4zF8WrEuj3xI3vTcuP92WYaWn9nUqA1POli85hFDRfT ZUIooRJUX/1/n9iBkxzJYYsXXJCqTAD9lRAsRxOaD1R+u1xuQnrKuaRMercLospXphoY dJXuPgduQseItt0JxOrOM3xuDJJ2pAQqNzopFvoJyyYgidD1RYl89PAW76/mGD8WJ2AL JyIA== X-Gm-Message-State: ALoCoQnLapXauzo0BXWxKGoQ2RioLRKkQY2RCqOgwx+By5hENPfUqYi8+ehe/phIgoEFlFkfMeN6 X-Received: by 10.202.65.67 with SMTP id o64mr44357626oia.45.1439688169323; Sat, 15 Aug 2015 18:22:49 -0700 (PDT) From: Bart Schaefer Message-Id: <150815182247.ZM18309@torch.brasslantern.com> Date: Sat, 15 Aug 2015 18:22:47 -0700 In-Reply-To: <32312.1439680450@thecus.kiddle.eu> Comments: In reply to Oliver Kiddle "bug with expansion and backslashes" (Aug 16, 1:14am) References: <20150415030531.GA8187@vapier> <20150415100324.296ffa3e@pwslap01u.europe.root.pri> <150415081348.ZM26219@torch.brasslantern.com> <20150415162650.61a7d399@pwslap01u.europe.root.pri> <150415092300.ZM26692@torch.brasslantern.com> <20150422100153.2bd64435@pwslap01u.europe.root.pri> <150425101458.ZM30959@torch.brasslantern.com> <32312.1439680450@thecus.kiddle.eu> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: bug with expansion and backslashes MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Aug 16, 1:14am, Oliver Kiddle wrote: } Subject: bug with expansion and backslashes } } On 25 Apr, Bart wrote: } > } > add backslash to alias expansion matching in _expand } > --- a/Completion/Base/Completer/_expand } > setopt aliases } > eval 'exp=( ${${(e)exp//\\[ } > -]/ }//(#b)([ } > +]/ }//(#b)([ \\ } > ])/\\$match[1]} )' 2>/dev/null } } I just noticed that expansion was broken when I tried to expand *\~ } (exiftran backs up files with a trailing ~ and I wanted to clean them up) } git bisect led me to 33ff5d06 which is the patch above. } } What's not clear to me is what problem this patch was trying to solve. Look at workers/32186 which refers back to users/18247 and its thread. It has to do with glob-expansion of file names that contain a character that needs to be protected with a backslash, particularly file names actually containing backslashes and/or quote marks. (In other words, if you had attempted to complete "*~" without having the backslash in there already, it would have worked and inserted the backslash for you.) I have no objection to backing out that change again, although it works as expected when extendedglob is NOT set.