1

I want to run a p4 command like:

p4 -P mypassword sync //depot/...

However, there is a special character '*' is my password which can't be recognized by the p4 command line.

Is there any way to escape the special character?

Maybe I could just change my password first to work around this problem.

Thank you in advance.

Edit: using %2A doesn't work for me.

Shane Lu
  • 1,056
  • 1
  • 12
  • 21

1 Answers1

0

You don't mention which shell you're using, but doublequoting works to prevent wildcard expansion in most shells I've used:

p4 -P "mypassword" sync //depot/...

Some shells also have options to globally disable wildcard expansion so you don't need to doublequote everything (although some command line utilities might depend on the shell's wildcard expansion, so look out for that -- most Perforce commands, however, will expand wildcards on the server if they aren't expanded by the shell on the client).

See: Stop shell wildcard character expansion?

Community
  • 1
  • 1
Samwise
  • 68,105
  • 3
  • 30
  • 44