From: Adam Thompson <arthompson1990@gmail.com>
To: Karl Dahlke <eklhad@comcast.net>
Cc: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] wordexp again
Date: Sat, 18 Apr 2015 14:24:06 +0100 [thread overview]
Message-ID: <20150418132406.GN5949@toaster.adamthompson.me.uk> (raw)
In-Reply-To: <20150318090934.eklhad@comcast.net>
[-- Attachment #1: Type: text/plain, Size: 1683 bytes --]
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
>
> r z*
>
> because you believe this will grab the correct file.
> But z* doesn't match anything.
> Since we are globbing you get the error message
>
> shell pattern doesn't match any files
>
> or something like that.
> Now if you're sure the file is called z*, or even zz,
> and you type
>
> r zz
>
> 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
>
> cannot open file zz
>
> Other than clear error messages corresponding to what you are trying to do,
> 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 globbed.
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/filestore/files/patches/"
then I just get "Shell pattern did not match any files." which is rather unhelpful.
Cheers,
Adam.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-04-18 13:25 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-16 21:40 Karl Dahlke
2015-04-17 7:12 ` Adam Thompson
2015-04-17 12:50 ` Adam Thompson
2015-04-17 13:33 ` Karl Dahlke
2015-04-17 17:59 ` Adam Thompson
2015-04-17 13:47 ` Karl Dahlke
2015-04-17 18:01 ` Karl Dahlke
2015-04-17 21:34 ` Adam Thompson
2015-04-17 21:58 ` Adam Thompson
2015-04-17 22:25 ` Karl Dahlke
2015-04-17 22:43 ` Adam Thompson
2015-04-17 23:14 ` Karl Dahlke
2015-04-17 22:28 ` Adam Thompson
2015-04-17 22:39 ` Karl Dahlke
2015-04-18 10:53 ` Adam Thompson
2015-04-18 4:18 ` Karl Dahlke
2015-04-18 10:49 ` Adam Thompson
2015-04-18 11:34 ` Karl Dahlke
2015-04-18 13:09 ` Adam Thompson
2015-04-18 19:33 ` Chris Brannon
2015-04-18 20:05 ` Adam Thompson
2015-04-18 23:03 ` Chris Brannon
2015-04-18 12:36 ` Karl Dahlke
2015-04-18 12:54 ` Adam Thompson
2015-04-18 13:09 ` Karl Dahlke
2015-04-18 13:24 ` Adam Thompson [this message]
2015-04-18 13:45 ` Karl Dahlke
2015-04-18 17:44 ` Adam Thompson
2015-04-18 19:48 ` Karl Dahlke
-- strict thread matches above, loose matches on Subject: below --
2015-01-09 22:44 Karl Dahlke
2015-01-09 22:19 Karl Dahlke
2015-01-09 22:29 ` Chris Brannon
2015-01-09 21:16 Chris Brannon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150418132406.GN5949@toaster.adamthompson.me.uk \
--to=arthompson1990@gmail.com \
--cc=Edbrowse-dev@lists.the-brannons.com \
--cc=eklhad@comcast.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).