[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PS-embedded comsub `\w' evaluation doesn't replace $HOME with ~
From: |
Chet Ramey |
Subject: |
Re: PS-embedded comsub `\w' evaluation doesn't replace $HOME with ~ |
Date: |
Mon, 13 Mar 2017 09:00:29 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 3/12/17 4:46 PM, Grisha Levit wrote:
> For example:
>
> $ PS1='\w $(echo \w) $ '
> ~ /home/levit $
Backslash-escape evaluation happens before parameter expansion, as
documented.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/