[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: i cant see whats the issue, .. ps1 + propt command + date
From: |
Chet Ramey |
Subject: |
Re: i cant see whats the issue, .. ps1 + propt command + date |
Date: |
Sat, 25 Sep 2021 16:46:09 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 |
On 9/25/21 3:09 PM, Alex fxmbsw7 Ratchev wrote:
i havent tried ( exactly ) the your two examples but i did with mine,
just on the term with --norc
it bugs..
alias s='_s=$( declare -p 2>&- IFS ) ' r='eval "${_s:-unset -v IFS}" '
now=$EPOCHREALTIME s IFS=. now2=( $now ) r ; declare -p now2
bash: declare: now2: not found
It's not a bug in bash, and it doesn't have anything to do with whether
or not the aliases end in spaces.
All of this crap ends up as
now=$EPOCHREALTIME _s=$( declare -p 2>&- IFS ) IFS=. now2=( $now ) eval
"${_s:-unset -v IFS}" ; declare -p now2
All of the assignment statements preceding the `eval' are part of the
temporary environment and do not persist beyond that command. It's just
that simple.
It might be a useful exercise to think about how your alias farm expands
and what the shell actually sees when it goes to execute the command.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
- Re: i cant see whats the issue, .. ps1 + propt command + date, (continued)
- Re: i cant see whats the issue, .. ps1 + propt command + date, Alex fxmbsw7 Ratchev, 2021/09/25
- Re: i cant see whats the issue, .. ps1 + propt command + date, Alex fxmbsw7 Ratchev, 2021/09/25
- Re: i cant see whats the issue, .. ps1 + propt command + date, Alex fxmbsw7 Ratchev, 2021/09/25
- Re: i cant see whats the issue, .. ps1 + propt command + date, Greg Wooledge, 2021/09/25
- Re: i cant see whats the issue, .. ps1 + propt command + date, Alex fxmbsw7 Ratchev, 2021/09/25
- Re: i cant see whats the issue, .. ps1 + propt command + date, Alex fxmbsw7 Ratchev, 2021/09/25
- Re: i cant see whats the issue, .. ps1 + propt command + date, Alex fxmbsw7 Ratchev, 2021/09/25
- Re: i cant see whats the issue, .. ps1 + propt command + date, Alex fxmbsw7 Ratchev, 2021/09/25
- Re: i cant see whats the issue, .. ps1 + propt command + date, Greg Wooledge, 2021/09/25
- Re: i cant see whats the issue, .. ps1 + propt command + date, Alex fxmbsw7 Ratchev, 2021/09/25
- Re: i cant see whats the issue, .. ps1 + propt command + date,
Chet Ramey <=
- Re: i cant see whats the issue, .. ps1 + propt command + date, Alex fxmbsw7 Ratchev, 2021/09/25
- Re: i cant see whats the issue, .. ps1 + propt command + date, Alex fxmbsw7 Ratchev, 2021/09/23