bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: history character not quoted by ""


From: Chet Ramey
Subject: Re: history character not quoted by ""
Date: Mon, 10 Feb 2003 16:04:47 -0500

> Machine Type: powerpc-suse-linux
> 
> Bash Version: 2.05
> Patch Level: 0
> Release Status: release
> 
> Description:
>       According to both the man page and the info page,
>       "Enclosing characters in double quotes preserves the
>       literal value of all characters within the quotes,
>       with the exception of $, `, and \."  However, if you
>       use a ! character between double quotes, it appears
>       to attempt to invoke a history mechanism.
> 
>       I don't know what the desired behavior is; it's possible
>       that only the documentation needs fixing.  (Personally,
>       though, I would prefer that history expansion not occur
>       inside double quotes.)

The documentation needs fixing.  The HISTORY section of the man
page has this to say:

       History expan-
       sions are introduced by  the  appearance  of  the  history
       expansion  character,  which  is ! by default.  Only back-
       slash (\) and single quotes can quote the  history  expan-
       sion character.

The QUOTING section says:


       When the command history expansion  facilities  are  being
       used,  the history expansion character, usually !, must be
       quoted to prevent history expansion.

This text should include the fact that double quotes don't quote the
history expansion character.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )

Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]