public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Eliot Moss <moss@cs.umass.edu>
To: cygwin@cygwin.com
Subject: Re: Zsh and wildcards
Date: Wed, 20 Feb 2019 22:25:00 -0000	[thread overview]
Message-ID: <b665ba5c-4ef6-7797-967c-679bbd654fde@cs.umass.edu> (raw)
In-Reply-To: <4884d0b2-737f-205e-bd7d-d8231c83b1bc@SystematicSw.ab.ca>

On 2/20/2019 4:39 PM, Brian Inglis wrote:
> 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.

... or just do: mv TSMUXER/.*.ac3 TSMUXER/tsmuxer.ac3

(Note the . after the / !)

Best - EM

--
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

      reply	other threads:[~2019-02-20 22:13 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
2019-02-20 22:25       ` Eliot Moss [this message]

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=b665ba5c-4ef6-7797-967c-679bbd654fde@cs.umass.edu \
    --to=moss@cs.umass.edu \
    --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).