From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 7550D7AF06 for ; Sat, 18 Apr 2015 06:25:15 -0700 (PDT) Received: by wiun10 with SMTP id n10so46952694wiu.1 for ; Sat, 18 Apr 2015 06:24:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=boFO/tSvtuOYgZMzdPTstlcQtRGS+8+vxxc8oQ/CyTQ=; b=JpyOR1hEfGat1uvl9UHzmy03OFzhoT/aa6fC9bZNTpYaRTq302jtZm6ReIIvxSJlRe gLr31lqU3nDo+Y7IooKCoQZvxKb+j6kBQPvvtISOpvcU4Sq6wJL6m8UT624sh/6R2/wm HyNB1Cf/A1qjQc9DIKixIMcNGVRNRAF7kmPG+YXGWSogW9BwZPz8BI7x9Dg2Ka0WaTYD 2ZlZw3Op3Uv8eNlDWj07sRrLWi9psyLLo5e7oyUPYSZq4b56EPDfgBL9PzmVlmOLlVlN +MQ1VF2CxFYFyzxWp6QR1gci0EkD7Z0AoRlSYKHDG3/QxKJQmER/izRPIUcihhTzig4o PBFg== X-Received: by 10.180.206.98 with SMTP id ln2mr9524152wic.94.1429363449773; Sat, 18 Apr 2015 06:24:09 -0700 (PDT) Received: from toaster.adamthompson.me.uk (toaster.adamthompson.me.uk. [2001:8b0:1142:9042::2]) by mx.google.com with ESMTPSA id i6sm9489873wjf.29.2015.04.18.06.24.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 Apr 2015 06:24:08 -0700 (PDT) Date: Sat, 18 Apr 2015 14:24:06 +0100 From: Adam Thompson To: Karl Dahlke Message-ID: <20150418132406.GN5949@toaster.adamthompson.me.uk> References: <20150316174053.eklhad@comcast.net> <20150418125413.GL5949@toaster.adamthompson.me.uk> <20150318090934.eklhad@comcast.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xTKfHyrFnSV9DG3y" Content-Disposition: inline In-Reply-To: <20150318090934.eklhad@comcast.net> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Edbrowse-dev@lists.the-brannons.com Subject: Re: [Edbrowse-dev] wordexp again X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Apr 2015 13:25:15 -0000 --xTKfHyrFnSV9DG3y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 18, 2015 at 09:09:34AM -0400, Karl Dahlke wrote: > The problem that the glob check solves is subtle, > and it only has to do with error messages. > Imagine you want to read a file into the current buffer. > You use the shorthand >=20 > r z* >=20 > because you believe this will grab the correct file. > But z* doesn't match anything. > Since we are globbing you get the error message >=20 > shell pattern doesn't match any files >=20 > or something like that. > Now if you're sure the file is called z*, or even zz, > and you type >=20 > r zz >=20 > you don't want to get that error message. > But that's what you get if you glob. > I know that you didn't want to glob, and didn't mean to glob, > and I give the other error message >=20 > cannot open file zz >=20 > Other than clear error messages corresponding to what you are trying to d= o, > the check probably doesn't change a thing. I think I'd rather clean up the error message and remove the checking tbh, something like: "No files found matching z*" That way we just glob and it works. Plus, if I'm using variable expansion and globbing I get to see what I actually g= lobbed. At the moment, if I have a variable $filepath which I think is set to say "/mnt/data/filestore/files/packages/descriptions/" and I know that I've got a file called zfs_latest_version.txt under that directory I'd probably type: e $filepath/z* Since I know that's the only file with that name under that directory. However if I've changed $filepath to something else like "/mnt/data/filesto= re/files/patches/" then I just get "Shell pattern did not match any files." which is rather un= helpful. Cheers, Adam. --xTKfHyrFnSV9DG3y Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVMlr2AAoJELZ22lNQBzHOumQH/2RoMKdT+7SlurLTYNTAcLLX /v6kcaKOL0ixHTcNgdnkHd4PdnnyKrz+05VexlfUhtf6TyZQbufHrmKBzrGQzE2P cRWTEBTPKwQPu1T5y6LDaha19Wx0bVUv5PpUz5iiKxYkv7FYiru93OrhJ9oKDAmy iGoA3m6sluSCRE9MqCVYhtRwkg3FHzOrnpnSFevG9w6LBPxGJgYHWx5D6aPs2g8J hF6LnMovxEx5koSQojjg2+ZxzEzg6F0fq1H/bilceI3lZ3RvupnK+gagv9+NnEvz V/39cZeMFnX7mjUTE9eaMXtMZ6ApwcG9bPev/fIxcfYsilwJaigQKvCNBBbxXEE= =p8Pt -----END PGP SIGNATURE----- --xTKfHyrFnSV9DG3y--