Zsh Mailing List Archive
Messages sorted by:
Re: Bug: Ubuntu apt-get install package-*
- X-seq: zsh-workers 39942
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Bug: Ubuntu apt-get install package-*
- Date: Mon, 14 Nov 2016 09:29:48 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=HN2C7mD/AlG/6RtfDGzmN/pMvDCt7hJrap5ylXjAz3E=; b=pJZvkpID1WEuuI5FT+shgJ6pUtzsbLCxskn+/WVN+PkJBlPJkOobyn4fu+O+Q4khGN sBuyaTy/tkfQ626A1PSifdXJCwKuSTbEe+sC5EYHzd7gVqeOkPfDoyKbQ3A7ZlJHrxt6 gpAeHyzV3506Ih/ocFgcC7EvzLH6rTAd7vDfmiOE0V4Ds7cVLqQFknXtfDRvYE5wNNjc 9pb9kcAv5AI8oOsWvGiokiTxM4HCP1/7PE9tBqK38Atr7dWehZraTEzWWdoStY1gmfQe wC3zsC+uPYw+y7LD1tvzVq7HtH79OPPo65GIOvRR600nitae7o+k7Cm894Xr40gKEh6n mWCg==
- In-reply-to: <firstname.lastname@example.org>
- List-help: <mailto:email@example.com>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAOCsvouMHChh5-Yk_FJYj0cx5wDe9rHmFsiu8EzUaSQ3X665ZQ@mail.gmail.com> <161110185448.ZM25929@torch.brasslantern.com> <email@example.com>
On Nov 14, 5:25pm, Oliver Kiddle wrote:
} > torch% echo bl?or*
} > zsh: correct 'bl?or*' to 'bl\?or\*' [nyae]? y
} > bl?or*
} An interesting idea. Given that correction happens before globbing
} I can't think of any particularly sane criteria for when to trigger
} this correction.
The less-horrible implementation would be to do this at the globbing
step where CSH_NULL_GLOB is applied. I just didn't want to go to the
effort of hooking up an entirely new spckword()-alike.
} The "horrible implementation" seems to take anything
} two characters in length or longer and ~ is not regarded as a pattern
} character. So haswilds must be returning false for just '*' or '?' which
} seems odd.
Yes, spckword() is doing funny things to avoid giving spelling errors on
~username etc. I didn't take very much care to avoid any of that when I
threw that example together.
} So as it is, it would just be irritating because it would offer a
} correction virtually every time you attempt to use a glob.
The NO_NOMATCH option would disable this, as would NULL_GLOB.
} If you defer
} the correction to when a glob fails then it could be irritating if a
} glob gets used in a loop
Yes, there would have to be a flag at some level that would indicate
whether the user had already accepted NO_NOMATCH behavior, so you'd
only be asked once per top-level prompt.
} And without making this the default, it probably won't help the situation
} much for bash exiles expecting nonomatch behaviour.
Yes, it would have to be the default when NOMATCH.
Messages sorted by: