public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Re: Zsh and wildcards
Date: Wed, 20 Feb 2019 21:41:00 -0000	[thread overview]
Message-ID: <4884d0b2-737f-205e-bd7d-d8231c83b1bc@SystematicSw.ab.ca> (raw)
In-Reply-To: <20190220181351.GP2904@mrvideo.vidiot.com>

On 2019-02-20 11:13, Mike Brown wrote:
> On Tue, Feb 19, 2019 at 11:31:24PM -0700, Brian Inglis wrote:
>> On 2019-02-19 13:42, Mike Brown wrote:
>>> Zsh 5.3 under Win7-64
>>> I'm trying to do the following:
>>>     mv TSMUXER/*.ac3 TSMUXER/txmuxer.ac3
>>> The problem is the the * is not being expanded.  I have no idea why not.
>>> Any tips will be appreciated.
>>
>> The command line implies you have a .ac3 file already in TSMUXER and want to
>> rename it to fixed name txmuxer.ac3. A lack of expansion implies there is no
>> file matching that pattern. You can prefix simple commands with echo to test
>> their effect. If a pattern is not expanded, use ls to check what exists in the
>> source directory, and where it differs from your expectation.
> 
> Ah, but the file I want to change the name of is indeed there.  For this
> particular run, the name is ".track_2.ac3".
> 
> And yes, I did all kinds of testing to see what was being presented.
> 
> For the time being I got around it by doing:
> 
>     mv TSMUXER/`ls -A TSMUXER` TSMUXER/tsmuxer.ac3
> 
> But, I'd rather use the wildcard.  Plus, I'd like to know why it isn't
> working and how to fix it.

Dotfiles .* are hidden by default under most shell expansions unless .* is
explicitly specified or shell specific options are specified: for zsh specify
the D glob qualifier *(D), for bash set shopt -s dotglob.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  parent reply	other threads:[~2019-02-20 21:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19 22:00 Mike Brown
2019-02-20  8:08 ` Brian Inglis
     [not found]   ` <20190220181351.GP2904@mrvideo.vidiot.com>
2019-02-20 21:41     ` Brian Inglis [this message]
2019-02-20 22:25       ` Eliot Moss

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=4884d0b2-737f-205e-bd7d-d8231c83b1bc@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).