Re: trap DEBUG and $_

2015-10-11 Thread isabella parakiss
On 10/11/15, Dan Stromberg wrote: > Is there a way of outputting a datestamp to shell stderr at the _beginning_ > of the execution of a command, that won't wipe out $_? > > I use $_ quite a bit for the last argument to the previous command, > interactively. And I'd like to datestamp all my comman

Something strange with string replacements

2015-10-11 Thread gaspar . bin
Hello, I was just testing if I could do some things with bash and the I came across this: $ tigres="Un tigre, dos tigres, tres tigres" $ echo ${tigres//[A-Z]/[a-z]} tt [a-z][a-z][a-z][a-z][a-z], Ale cto kkk log nfs tes tmp tst www [a-z][a-z][a-z][a-z][a-z][a-z], aeat home kaka lmms Mail prog te

trap DEBUG and $_

2015-10-11 Thread Dan Stromberg
Is there a way of outputting a datestamp to shell stderr at the _beginning_ of the execution of a command, that won't wipe out $_? I use $_ quite a bit for the last argument to the previous command, interactively. And I'd like to datestamp all my commands. Datestamping after with $PS1 is easy, bu

posix handling of mapfile: SEGFAULT

2015-10-11 Thread Linda Walsh
This was in the 2nd half of the note in the read&env+POSIX=>SEGFAULT, but think it got missed by focus on the 1st part. # I was doing some syntax testing and decided to try posix mode # (as it disallows various vague or unclear constructs) # in the working cases yielded the same results, but # i

Re: read and env variables + POSIX => SEGFAULT

2015-10-11 Thread Linda Walsh
Geir Hauge wrote: On Sat, Oct 10, 2015 at 08:01:05PM -0700, Linda Walsh wrote: # this is odd: 2vars with content for 2: unset a b a= b= read a b <<< x y declare -p a b declare -- a="x" declare -- b="" # -- where did "y" go? read a b <<< x y is the same as read a b y <<< x If you

Re: ! in PS1 in posix mode

2015-10-11 Thread Chet Ramey
On 10/11/15 2:22 AM, isabella parakiss wrote: > On 10/11/15, isabella parakiss wrote: >> In posix mode, bash replaces ! in my PS1 with the history number. >> >> $ PS1=' ! ' >> ! set -o posix >> 513 exit >> >> It doesn't happen with any other prompt escape sequence, afaict. >> This looks... inten

Re: read and env variables

2015-10-11 Thread Chet Ramey
On 10/10/15 8:09 PM, isabella parakiss wrote: > $ a= read a <<< x # this creates a variable in the current shell > $ declare -p a > declare -- a="x" > > $ b= mapfile b <<< x# this doesn't > $ declare -p b > bash: declare: b: not found > > > Other shells don't seem to agree on what shou

Re: make first different character bold when showing completions ala emacs

2015-10-11 Thread 積丹尼 Dan Jacobson
> "CR" == Chet Ramey writes: CR> There is an option in readline-7.0 that will cause completion to display CR> the common prefix of a set of possible completions in a distinctive CR> color. This has essentially the same visual effect. OK. I see http://packages.debian.org/readline-common is o

Re: ! in PS1 in posix mode

2015-10-11 Thread Chet Ramey
On 10/11/15 1:37 AM, isabella parakiss wrote: > In posix mode, bash replaces ! in my PS1 with the history number. http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_05_03 "The shell shall replace each instance of the character '!' in PS1 with the history file number o

Re: Want way to run background processes with SIGINT unignored

2015-10-11 Thread Ian Jackson
Chet Ramey writes ("Re: Want way to run background processes with SIGINT unignored"): > On 10/9/15 2:42 PM, Ian Jackson wrote: > > However, it would be very easy for bash to provide an option (via `set > > -o' perhaps) to disable this behaviour. That is, to allow SIGINT to > > be delivered normal

Re: read and env variables + POSIX => SEGFAULT

2015-10-11 Thread Geir Hauge
On Sat, Oct 10, 2015 at 08:01:05PM -0700, Linda Walsh wrote: > # this is odd: 2vars with content for 2: > >unset a b > >a= b= read a b <<< x y > >declare -p a b > declare -- a="x" > declare -- b="" > > # -- where did "y" go? read a b <<< x y is the same as read a b y <<< x If you escap