[p4] Re: 'p4 have * ' under NT Cygwin bash

Scott Blachowicz Scott.Blachowicz at seaslug.org
Tue Jan 18 13:14:17 PST 2000


Mark Kohler <MKohler at Nomadix.com> wrote:

> I'm attempting to use the Perforce command-line client under Cygwin B20.1
> bash. The problem I have is that 'p4 have *' doesn't seem to work. It
> lists all the files in the local directory as not on client, even though
> some of them are.
> 
> If I explicitly list the client view as in 'p4 have //user/d:/dir1/dir2'
> then it works fine.
> 
> I'm guessing this is some problem with matching up forward and backward
> slashes in the current directory or one of the views? It works fine
> when using cmd.exe as the shell.

Your problem appears to be that normal behavior for a Unix-style shell is to
expand filename wildcards before passing the args off to the sub-command. In
this case your 'bash' is expanding the '*' to all the files in your directory,
then passing the new arg list off to the p4 command.

You have 2 choices:

1) Quote the "*" so it isn't treated as a filename wildcard by bash:

	p4 edit '*'

   You might have to experiment with that to make sure the 'p4'
   command doesn't try to duplicate that "expand filename mask"
   behavior locally.

2) Use a p4 specific equivalent

	p4 edit %1

   where the "%1" is a synonym for the "*" mask, but without the special
   meanings elsewhere (e.g. bash). The "%1" should get expanded by the p4
   server.

--
Scott.Blachowicz at seaslug.org




More information about the perforce-user mailing list