Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: globbing working on CLI but not in file
- X-seq: zsh-users 23755
- From: Vincent Bernat <bernat@xxxxxxxx>
- To: Eric Smith <es@xxxxxxxxxxxx>
- Subject: Re: globbing working on CLI but not in file
- Date: Sun, 11 Nov 2018 23:19:23 +0100
- Cc: zsh-users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=luffy.cx; h=from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type:content-transfer-encoding; s=fm1; bh= 7drapUkl16P3LTTCnfNGydmuj4IMzEO/2wRkgfFEvGg=; b=iE9yC1HAK3U+jVLm ZDZoyS2GIkAFzN3a8yP3g7ivmy3smbYNTgjzZQ724RVwWXVp1OLDAc6GYB1ko5FS vfEgm7ynShNoxMl7/EgGT2VRgK5ZY54BWbbxEmDBSneVZPYCwE5hz6egl8QC5rjC BXygxI7cVYLwdBqyN7mmJ3xilIgUYZnHfVbck9CGE1FQs+FLFwzOX6vPII3sD09k E/aif0z9t0WHORg90vSU8jID7OPABjNWDNneqpSELix98fMGTlgyzwRQtaBRT0s+ t0Xsf0QuY7FbKLLsmYPlqrcComd07Ubb5AU8CR3KbRRI1kz8oiVbWGLSVLWFpfzR eedsaQ==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=7drapUkl16P3LTTCnfNGydmuj4IMzEO/2wRkgfFEv Gg=; b=L68+rpL6yasK8Nz2f1l/TA20DJFnGBoYsXMgfs1cB1Ge0PKjy/YL5oN2r 8GMI3nF1sXbIKAM04niM2Gtufmmjwpkyz9QNtbygnKJC6jpEEs9cq3wvZa2bcUVb /UgM0LJLbWzN/03rhdzvOMr+NlZtgHILx8wefwwIjM8uUwfFlBc4+vgaRMB118Uz eVI6vQuYcTTnU+o+cxoDTw3L3v5e1zaY/W2+jJGayitJsjltFMjXxaqaIF83/mp4 sWxGLc5S8SMBKX5oe/bDSiRLP13gXGF1W4UQvNYtiLsEuE5gmhJQl+yX4aahxyBC 04AhxBl34H80HqqUT4JQnioQUFO5w==
- In-reply-to: <20181111215317.imsuiifj2ezew33s@trustfood.org> (Eric Smith's message of "Sun, 11 Nov 2018 22:53:17 +0100")
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20181111215317.imsuiifj2ezew33s@trustfood.org>
❦ 11 novembre 2018 22:53 +0100, Eric Smith <es@xxxxxxxxxxxx>:
> This glob works when executed on the CLI
>
> $ ls [^~](#i)*xls*(.om[1])
> something_with_xls_in_it.xls
>
> But not in a file
>
> $ /usr/bin/zsh --no-rcs -x bin/lastmatch
> +/etc/zsh/zshenv:15> [[ -z /Users/eric/bin: ... other path here ////bin:/usr/bin ]]
> bin/lastmatch:2: no matches found: [^~](#i)*xls*(.om[1])
>
> $ zsh --version
> zsh 5.1.1 (x86_64-ubuntu-linux-gnu)
>
> Thanks to anyone who can help me to run this in a script.
You need to enable extendedglob option:
setopt extendedglob
--
Suspicion always haunts the guilty mind.
-- Wm. Shakespeare
Messages sorted by:
Reverse Date,
Date,
Thread,
Author