bzr commit fails if commit message contains "!"

Asked by Matthew Paul Thomas on 2007-02-16

When my commit message contains an exclamation mark, I get an error.

images> bzr commit -m "Adds some icons. (With source code, even!)"
bash: !": event not found
images>

I'm not sure whether this is bzr's fault or bash's fault, but since the exclamation mark is inside a pair of quotes, I'd expect bash to ignore it. What's going on?

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
Wouter van Heyst
Solved:
2007-02-18
Last query:
2007-02-18
Last reply:
2007-02-16
Best Wouter van Heyst (larstiq) said : #1

On Fri, Feb 16, 2007 at 06:20:25AM -0000, Matthew Paul Thomas wrote:
> New support request #3727 on Bazaar:
> https://answers.launchpad.net/bzr/+ticket/3727
>
> When my commit message contains an exclamation mark, I get an error.
>
> images> bzr commit -m "Adds some icons. (With source code, even!)"
> bash: !": event not found
> images>
>
> I'm not sure whether this is bzr's fault or bash's fault, but since
> the exclamation mark is inside a pair of quotes, I'd expect bash to
> ignore it. What's going on?

Double quotes are still checked for constructions to evaluate, I've made
the same mistake with "Fix `bzr something`" before. If you don't want
your shell to touch anything, use single quotes.

Wouter van Heyst

Matthew Paul Thomas (mpt) said : #2

Ok, thanks!