bash should consult .config/bash/...

2023-12-09 Thread jidanni
Maybe on the list of config files bash looks at, there should be also .config/bash/... as that is the trend these days...

quotes invade positional parameters

2010-12-18 Thread jidanni
WITNESS for yourselves as the quotes invade the parameters, absconding with the ones at the edges, when close enough. $ cat 201012contract #!/bin/sh -eux set a b c d e f : ''$@'' : ' '$@' ' : ''$*'' : '' $* '' : " "$* " " $ ./201012contract + set a b c d e f + : a b c d e f + : '

Re: quotes invade positional parameters

2010-12-18 Thread jidanni
> "JS" == Jan Schampera writes: JS> I'd say this is expected (and by the way it's not only on set -x). I see. The spaces indeed get glued to the sides. OK, see ya next time.

Re: quotes invade positional parameters

2010-12-18 Thread jidanni
Well anyway, it would be 'no skin off of bash's back' if it just reported what it was given. If it was given ' 'a b c it should report ' 'a b c and not just 'assume' we prefer ' a' b c or ' a' 'b' 'c' etc. Just as legitimate and doesn't cause calls in the middle of the night from the old fol

Re: quotes invade positional parameters

2010-12-22 Thread jidanni
Indeed, it is more compact to report ' a' than \ \ \ \ \ \ \ \ \ \ a OK OK... see you next bug.

backslash required for [\/]

2010-12-25 Thread jidanni
I have discovered yet another bug in your "bash" program. First we see how a normal program, trusty sed, deals with [ ]: $ r=abaab; echo $r|sed 's/[:?/ba]/u/g' u Now we try "bash": $ r=abaab; echo ${r//[:?/ba]/u} abaab $ r=abaab; echo ${r//[:?\/ba]/u} u

reveal matched chars before asking "Display all possibilities", not after

2011-01-13 Thread jidanni
Here only after I say 'n' is it revealed to me that I have already completed /func, not just /fu: $ w3m /usr/share/doc/php-doc/html/fu Display all 5361 possibilities? (y or n) n $ w3m /usr/share/doc/php-doc/html/func Therefore, please make bash, upon receiving a , first add all the additional mat

set -m +m -x and the element of chance or is it race conditions?

2011-01-23 Thread jidanni
Gentlemen, I am disturbed by these seemingly irregular results, # perl -pwle 's/\d{4}//' mm|sort|uniq -c 88 ++ kill 44 ++ set +m 44 ++ set -m 1 ++ sleep 33 2 ++ sleep 66 1 ./rt: line 12: Terminated sleep 33 1 ./rt: line 12: Te

Re: set -m +m -x and the element of chance or is it race conditions?

2011-01-24 Thread jidanni
Thanks Greg, but aren't I acting by the rules? $ cat l set +m sleep 44& kill $! $ for i in `seq 33`; do bash -xm l; done Which gives + kill 5256 + set +m + kill 5258 + set +m + kill 5260 l: line 4: 5260 Terminated sleep 44 + set +m + kill 5262 + set +m + kill 5264 + set +m I.e., one

Re: set -m +m -x and the element of chance or is it race conditions?

2011-01-24 Thread jidanni
> "GW" == Greg Wooledge writes: GW> You used seq, so you're clearly doing it on Linux. Maybe it's an GW> OS-specific thing? Package: bash Version: 4.1-3 Debian Release: 6.0 APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.

Re: set -m +m -x and the element of chance or is it race conditions?

2011-01-28 Thread jidanni
I isolated the problem and submitted http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=611417 which I forget to X-Debbugs-cc to bash-...@gnu.org, which I should have, as it probably is a upstream problem that only the bash authors can fix.

Re: set -m +m -x and the element of chance or is it race conditions?

2011-01-29 Thread jidanni
> "CR" == Chet Ramey writes: CR> Is it a problem? Bash prints messages about signal-terminated processes -- CR> at least those that don't die due to SIGINT or SIGPIPE -- when the CR> shell is not interactive. Most people want to know when their jobs die CR> and their scripts fail. But some

Re: set -m +m -x and the element of chance or is it race conditions?

2011-01-29 Thread jidanni
Don't forget to mention that there better be e.g., at least a sleep 0 after it, if they want to be sure to see the message.

Re: set -m +m -x and the element of chance or is it race conditions?

2011-01-29 Thread jidanni
> "CR" == Chet Ramey writes: CR> Is everything you don't like that's not explicitly documented a bug? In CR> any case, a little thought should tell you why having the shell stick CR> around long enough to catch the child's death makes a difference. With me you can exclude the concept of thou

help's blank lines have four spaces appended

2011-02-06 Thread jidanni
Why add the four spaces? $ help read|perl -nwle 's/ $/ \$/ && print' $ $ $ $ $ $ $ $ $

no way to give 'select' a default value

2011-02-21 Thread jidanni
There is no way to give the 'select' command a default value, so all the user does is need to hit return. $ help select ... If the line is empty, WORDS and the prompt are redisplayed. Well OK, If EOF is read... but many users aren't familiar with ^D.

document factors influencing select's number of columns

2011-02-22 Thread jidanni
The 'select' documentation should also document the perhaps complex way $LINES $COLUMNS the number of items the length of the longest item interact to determine if the items will be displayed in rows/columns, etc.

TAB vs. colon

2011-12-30 Thread jidanni
The user pastes this into his shell window and adds u $ ls /sys/devices/LNXSYSTM:00/device:00/PNP0A08:00/PNP0C0A:00/power_supply/BAT0/u Any point in making him painfully go back and put backslashes behind each colon before expansion works (giving .../BAT0/uevent)?

Re: TAB vs. colon

2011-12-30 Thread jidanni
> "JS" == Jon Seymour writes: JS> You mean apart from the obvious that perhaps the user's intent was to JS> paste unescaped colons into the command line at that point? In any JS> case, paste is a function of the terminal, not the shell. I'm saying normally when we build a path, we enter severa

Re: TAB vs. colon

2011-12-30 Thread jidanni
> "GH" == Geir Hauge writes: GH> A workaround would be to quote the path. E.g. instead of GH> ls u GH> do GH> ls ''u KoOl! It's a deal and I withdraw my case. Let's just hope this tip is documented.

let's set the positional parameters with a simple 'read'

2012-01-03 Thread jidanni
One can do $ read p to set $p but no just as easy method to set $@, $1, etc. One must do $ set -- `cat` #which involves ^D, "too much trouble" Or set -- `read x; echo "$x"` etc. No, nothing as easy as $ read 1 sds bash: read: `1': not a valid identifier $ read @ sdss bash: read: `@': not a valid i

Re: let's set the positional parameters with a simple 'read'

2012-01-03 Thread jidanni
> "GW" == Greg Wooledge writes: GW> Why not just use a named array? GW> $ read -a myarray But does that let me get a my favorite array, the positional parameters?

Re: let's set the positional parameters with a simple 'read'

2012-01-03 Thread jidanni
Hmmm, as S. CHAZELAS said seems zsh also gives one a chance to reset an arbitrary positional parameter, e.g., the 42nd, whereas in bash one must set them all at once: $ set `seq 55` $ echo $42 42 $ echo $66 66 :-) Anyway isn't it rather old fashioned not to be able to somehow reset ${42} without ne

protection against accidental massive pastes into the command line

2012-04-26 Thread jidanni
Maybe there should be a limit, MAX_INTERACTIVE_COMMAND_LENGTH on how much can be fed into one bash command line, any more and bash should beep and reject the whole command. Otherwise an innocent middle click, or SHIFT INSERT slip of the fingers could paste an entire book out of the clipboard, into

Re: protection against accidental massive pastes into the command line

2012-04-26 Thread jidanni
This would also save on later having to clean the massive blob out of the history list.

error messages should spit back out UTF-8

2012-05-06 Thread jidanni
$ LC_ALL=zh_TW.UTF-8 $ 哼 bash: $'\345\223\274':命令找不到 It really should spit out what it was given, not octal.

Display all 224 possibilities? (y,n,t,?,...)

2012-07-01 Thread jidanni
Dudes! I've got a brilliant idea. Instead of just saying Display all 224 possibilities? (y or n) Why not also offer more, like (y,n,t,?) Add t where t is by time as in 'ls -t', and "?" is to explain them all. While you are at it, why not add even more, all from ls. l = ls -l etc. And w

Why does -v not work until after "}" in scripts?

2012-07-30 Thread jidanni
Why does -v not work until after "}" in this script? # su - nobody No directory, logging in with HOME=/ $ cat /tmp/o { set -v # NO STDERR } # YES STDERR $ sh /tmp/o # YES STDERR bash: Installed: 4.2-4

Re: Why does -v not work until after "}" in scripts?

2012-07-30 Thread jidanni
Well -x works right away, but -v gets stuck until all depths of nested { } are over with.

variables vs. TAB

2012-08-15 Thread jidanni
$ mkdir /tmp/some_dir $ touch /tmp/some_dir/file $ a=/tmp $ cat $a/some /tmp/some Note how the former TAB just gives $a/some_dirBUG! Which SPACE one must replace with a / by hand to continue expanding like the latter. Whilst the latter gives /tmp/some_dir/ correctly. bash: Install

Bug#710588: display of search string very wrongly stops when can't find any match

2013-05-31 Thread jidanni
X-debbugs-Cc: bug-bash@gnu.org Package: readline-common Version: 6.2+dfsg-0.1 Do this: C-r 1 2 3 4 5 6 7 ... You will see on your screen (reverse-i-search)`1234': or you will see more or less digits depending on your history. The point is sooner or later the digits won't reflect what the actua

bash: read: `0': not a valid identifier: check earlier

2013-06-06 Thread jidanni
$ read 0 ddd bash: read: `0': not a valid identifier Can't the check be done earier? E.g.: $ read 0 bash: read: `0': not a valid identifier

don't just seek to the next line if the script has been edited

2013-06-07 Thread jidanni
Let's say you are running a script that is doing a loop while ... echo Enter name; read name; .. During which the script gets edited on the disk by somebody. Well shouldn't bash, when it goes back to the disk to read some next part of the script, first do some sort of check to tell if the script

Re: don't just seek to the next line if the script has been edited

2013-06-07 Thread jidanni
Well OK but sometimes a script could be running for years, during which any change to a file will result in bash executing random bytes... Imagine if you press down on the mouse button meanwhile someone moves the screen up or down... you end up pressing on a different person's face. So I don't se

Re: don't just seek to the next line if the script has been edited

2013-06-07 Thread jidanni
> "GW" == Greg Wooledge writes: GW> On Fri, Jun 07, 2013 at 09:09:53PM +0800, jida...@jidanni.org wrote: >> Well OK but sometimes a script could be running for years, during which >> any change to a file will result in bash executing random bytes... GW> This is why you don't edit an installed

Re: don't just seek to the next line if the script has been edited

2013-06-07 Thread jidanni
> "GW" == Greg Wooledge writes: GW> You're talking about adding a ridiculous amount of extra checking GW> and performance penalty to try to avoid users shooting themselves in GW> the foot *on Unix*. I dunno... I thought it might be just reading a couple bytes from where the date is stored bef

Re: don't just seek to the next line if the script has been edited

2013-06-07 Thread jidanni
> "CR" == Chet Ramey writes: CR> I think the correct solution is to retain this behavior where it is CR> required (e.g., when reading a script from the standard input) and to CR> discard it when reading a script from a file. This doesn't directly CR> address the jidanni's concern, but I think

noclobber vs command not found

2013-06-08 Thread jidanni
Hello noclobber fans. It was a cheery day, until during an aptitude "safe-upgrade", Processing triggers for hicolor-icon-theme ... (gtk-update-icon-cache:13613): GdkPixbuf-WARNING **: Cannot open pixbuf loader module file '/usr/lib/i386-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache':

Re: noclobber vs command not found

2013-06-10 Thread jidanni
> "GW" == Greg Wooledge writes: GW> I find tab completion to be a primary safeguard Yes but in this case I am merely obediently copying the whole line with my mouse and stuffing it into the shell. Thanks anyway though.

can't just hold down ^K to clean up history

2013-10-16 Thread jidanni
Let's say one accidentally pastes a many lines of some email into a bash window. Yes bash tries to execute each line. Can't blame it. But now we are faced with cleaning the mess out of history. We use ^P^P^P^P^P^P^P... to finally get to the top of the mess. Then we must use ^K^N^K^N^K^N^K^N^K^N

Re: can't just hold down ^K to clean up history

2013-10-16 Thread jidanni
>> Also why can't we just hold down ^K^K^K^K^K^K^K^K^K ? CD> Why do you expect to be able to do that? C-k in readline deletes to the end of CD> the current line. There's no reason why it should also get the next line. Ah ha, but there is also no reason why it should not! I hereby propose that i

Re: can't just hold down ^K to clean up history

2013-10-17 Thread jidanni
On Thu, Oct 17, 2013 at 07:54:47AM -0400, Chet Ramey wrote: > It's the difference between a line-oriented command editing tool and > a screen editor. Well, it could go that extra mile, as a extra bonus, since it is usually doing nothing better (well most commands are all on one line), to let us aut

let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND

2014-01-29 Thread jidanni
Gentlemen, I have once again come up with a million dollar idea for bash, revolutionizing the shell world. As we all know, nobody in their right mind could type more than one command per second into bash when in interactive mode. So let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND=1.

man bash vs. help exec

2007-06-15 Thread jidanni
man bash vs. help exec: exec [-cl] [-a name] [command [arguments]] exec [-cl] [-a name] file [redirection ...] Too different looking for comfort. ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

prevent more regretful "suspend"

2007-06-18 Thread jidanni
Regarding suspend: suspend [-f] Suspend the execution of this shell until it receives a SIGCONT signal. The `-f' if specified says not to complain about this being a login shell if it is; just suspend anyway. My problem is often in an e.g., xterm window I suspend by accident, forge

TAB strips wildcards

2007-08-29 Thread jidanni
Here is a true case of what happens when you hit TAB with a wildcard: $ shar /tmp/logs/*/*/* access.log access.log $ shar /tmp/logs/ Yes, it strips the wildcards!

Re: TAB strips wildcards

2007-08-29 Thread jidanni
EB> Have you installed a completion function? # su - nobody No directory, logging in with HOME=/ [EMAIL PROTECTED]:/$ #WHATEVER /tmp/logs/*/*/* access.log access.log [EMAIL PROTECTED]:/$ bind 'set show-all-if-ambiguous on' [EMAIL PROTECTED]:/$ #WHATEVER /tmp/logs/*/*/* access.log access.log [

update man page for Maildir

2007-08-31 Thread jidanni
MAIL If this parameter is set to a file name and the MAILPATH variable is not set, bash informs the user of the arrival of mail in the specified file. Mention that MAIL=/home/jidanni/Maildir/ style directories are OK too.

case/esac: mention backslash to match a leading "("

2007-12-15 Thread jidanni
On the man page: case word in [ [(] pattern [ | pattern ] ... ) list ;; ] ... esac perhaps mention one needs a backslash to match a leading "(": case '(1' in (1) echo 2;; \(1)echo 3;; esac

ESC . on # items

2007-12-17 Thread jidanni
$ echo abc abc $ #echo xyz $ Now do "ESC ." and experience the pain of the buzzer or visual bell that means one has done something bad. Yes, I know you are against thinking that one would ever want the last item of something one commented out, but at least you don't have to chastise them :-( I pers

ESC . vs. ^R, ^P again

2008-01-01 Thread jidanni
As there years pass I use ESC . daily hoping that it will get the last chunk of the previous line on my screen, despite any ^P's or ^R's I might have done. Never have I wanted it to consider those ^P's and ^R's. So even though you said that was a early design choice, perhaps you could still leave

Re: ESC . vs. ^R, ^P again

2008-01-04 Thread jidanni
A> I think you want ESC _ which will pull in the last word of the A> previous command. Thanks but it's $ man bash|grep M-_ yank-last-arg (M-., M-_) insert-last-argument (M-., M-_) the same as M-., whose behavior I was railing against.

Re: ESC . vs. ^R, ^P again

2008-01-07 Thread jidanni
C> "\M-.":"\M->\M-_" Thanks but that doesn't work. $ : 1 $ : 2 $ : 3 $ : 4 $ I want now typing ^R 2 ^E M-. to put a 4 at the end of the line but the above macro does not.

Re: ESC . vs. ^R, ^P again

2008-01-07 Thread jidanni
$ bind '"\e.":"\e>\e_"' $ : 1 $ : 2 $ : 3 $ : 4 $ >> I want now typing ^R 2 ^E M-. to put a 4 at the end of the line... ...and not wipe out the 2, which is what the above bind did. BASH_VERSION='3.1.17(1)-release'

Re: Dr. Evil typed sleep 666; rm -rf /

2008-02-11 Thread jidanni
Your attention is drawn to the current thread, a small sample of which is: Newsgroups: comp.unix.shell Subject: Re: Dr. Evil typed sleep 666; rm -rf / Date: 11 Feb 2008 >bash is the only shell that will run "rm" if you interrupt >"sleep" with C-c. >> >>All the other shells including the Bourne sh

set +o history hard to keep turned off

2008-02-23 Thread jidanni
Put set +o history at the bottom of .bashrc and confirm that it is indeed the last thing run via $ bash -x But then do $ set -o|grep history which will show that it is turned back on.

document export x=1 y=$x

2008-03-17 Thread jidanni
On the man page at section "export", mention that the latter below will not do what one expects, as here revealed: $ set -x $ a=1 b=$a + a=1 + b=1 $ export x=1 y=$x + export x=1 y= + x=1 + y= Yes I'm sure it is mentioned elsewhere on the page but you might want to drum it home again here. Maybe als

TZ=... date affected PROMPT_COMMAND

2008-04-16 Thread jidanni
Never thought that putting TZ here would infect my prompt, 21:07 ~$ date Wed Apr 16 21:07:54 CST 2008 21:07 ~$ TZ=America/Chicago date Wed Apr 16 08:08:07 CDT 2008 08:08 ~$ set a b c 08:08 ~$ date Wed Apr 16 21:08:22 CST 2008 21:08 ~$ all the way until the next non built-in command. Need to do sh

Re: TZ=... date affected PROMPT_COMMAND

2008-04-17 Thread jidanni
OK, now using Archimerged's cleaner version, I bet Matthew can reproduce this. [EMAIL PROTECTED]:/root# su - nobody No directory, logging in with HOME=/ [EMAIL PROTECTED]:/$ PROMPT_COMMAND='prompt_status=\ $?' [EMAIL PROTECTED]:/$ PS1=$SPECIAL_PS1"\A\${prompt_status# 0} \W$ " 17:26 /$ TZ=America/L

Re: TZ=... date affected PROMPT_COMMAND

2008-04-18 Thread jidanni
OK, glad that it is fixed in bashes beyond what Debian sid uses. M> you still didn't answer my question, which was "what version are you using"? Did too: >> 02:26 /$ echo $BASH_VERSION >> 3.1.17(1)-release Over and out.

Re: [Pkg-shadow-devel] Bug#476519: shell-mode garbles input

2008-05-01 Thread jidanni
As http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=476519 says, maybe it is a bash bug: with Debian sid's BASH_VERSION=3.2.33(1)-release about half the time the below works normally, the other half some magic hand sends "exit" to it, logging me out right away. The first letter of which gets bitten

Re: [Pkg-shadow-devel] Bug#476519: shell-mode garbles input

2008-05-02 Thread jidanni
SC> Try SC> sudo env -i SHELLOPTS=xtrace su -p - nobody (I don't use sudo) uid=0(root) gid=0(root) groups=0(root) # env -i SHELLOPTS=xtrace su -p - nobody + PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games + '[' /bin/sh ']' + PS1='[EMAIL PROTECTED]:\w\$ ' + export PATH + umask 022 [EMAIL P

Re: [Pkg-shadow-devel] Bug#476519: shell-mode garbles input

2008-05-02 Thread jidanni
Here we see the typical deal. You asked me about ulimit. I tried to get a shell oh, six times this time before the magic hand stopped logging me out. Whereupon it bites off the first character of what I type and logs me out, saving the message for after the next prompt. Then I get a shell again to

Re: [Pkg-shadow-devel] Bug#476519: shell-mode garbles input

2008-05-02 Thread jidanni
CR> Does this happen only in an emacs shell-mode window? No. It happens also in xterm. Today it at least allowed me to do -c date. I did not type exit or logout. The magic hand did. # su - nobody -c date No directory, logging in with HOME=/ Sat May 3 01:03:10 CST 2008 # su - nobody -c 'sh -i' No d

distinguish shell generated exits

2008-05-02 Thread jidanni
There are several situations where $ exit and $ logout were typed by the shell and not the user, who must specifically say "I did not type that, some magic hand did" when sharing shell transcripts with other people. So perhaps those messages should have a "bash:" prepended or something to distingu

Re: [Pkg-shadow-devel] Bug#476519: shell-mode garbles input

2008-05-03 Thread jidanni
SC> Could you try ulimit -a? # su - nobody -c ulimit\ -a|grep -v unlimited core file size (blocks, -c) 0 scheduling priority (-e) 0 pending signals (-i) 1791 max locked memory (kbytes, -l) 32 open files (-n) 1024 pipe size

Re: [Pkg-shadow-devel] Bug#476519: shell-mode garbles input

2008-05-05 Thread jidanni
All I have installed else is dash: 4 successes 0 failures. SC> perl -e '$<=$>=$(=$)=65534; exec sh' That gets a shell without triggering the error. SC> perl -e '$<=$>=$(=$)=65534; system sh' That filled emacs with \377's with luckily a little CPU left over that I could kill emacs... * SC> Not sure

Re: what matched in a case statement

2008-05-14 Thread jidanni
Poor Yorick wrote: > Is there any way to get a handle on what matched in a case > statement? Something like this: > > case "lawlesspoets" in > *poets) > echo $CASEMATCH one Well, nobody would do > case "lawlesspoets" in in reality you would always have some variable. So ju

Re: Dr. Evil typed sleep 666; rm -rf /

2008-06-15 Thread jidanni
The following message is a courtesy copy of an article that has been posted to comp.unix.shell as well. Regarding how to defuse $ sleep 666; echo BOOM given only one terminal, m> Here, running bash in a xterm, this works for me: m> ^S ^C ^C ^Q For me in xterm, or even on the Debian sid tty1 conso

test -t

2008-09-03 Thread jidanni
On (info "(coreutils)File type tests", and test(1) man page, we see `-t FD' True if FD is a file descriptor that is associated with a terminal. Well please mention what happens if FD is omitted: $ test -t The answer is it always returns true, no matter what. Test with $ echo 'set -x; for

Re: test -t

2008-09-03 Thread jidanni
Is this a bug? >> $ t=test #bash builtin >> $ $t -t ' '; echo $? >> 0 PJ> That looks like a bug. bash tries to parse a number from the " " PJ> string and ends up with zero, which is a tty.

script vs. terminal vs. same line vs. ^C

2008-09-09 Thread jidanni
Here we see with the same $-, if you put it on the same line, you'll run it despite ^C... $ cat file echo $-; sleep 7; echo BOOM $ bash -i file bhimBC ^C $ echo $-; sleep 7; echo BOOM bhimBC ^C BOOM OK, same $-, and same test -t , so what does one have to do to make bash think it is a script and

"C-z bg" without the lurch

2008-11-25 Thread jidanni
There are many times one has not planned ahead, and forgets the &: $ emacs -nw important.txt #then after a half an hour of editing: ^Z [1]+ Stopped emacs -nw important.txt $ compact_disk_burner_GUI_application #forgot to add & OK, we want to get back to emacs, but we dare not stop

document -u $@ $* special case

2008-11-26 Thread jidanni
Gentlemen, I have discovered a documentation oversight. In the manual, we see: -u Treat unset variables as an error when performing param- eter expansion. If expansion is attempted on an unset variable, the shell prints an error me

echo $s{2,3}

2008-12-13 Thread jidanni
What happened to 2,3? Poof, gone. $ s=a; echo $s{ $s{} $s} $s{1} $s{2,3} ${s}{4,5} a{ a{} a} a{1} a4 a5

<

2008-12-16 Thread jidanni
*** bash.1.orig 2008-12-17 07:41:13.193756000 +0800 --- bash.1 2008-12-17 07:39:39.845759000 +0800 *** *** 3157,3159 current source until a line containing only ! .I word (with no trailing blanks) --- 3157,3159 current source until a line containing only ! .I delimi

Re: <

2008-12-17 Thread jidanni
j> + If \fIdelimiter\fP is not found or \fIword\fP is null, reading proceeds to the end of file. Make that just If \fIdelimiter\fP is not found, reading proceeds to the end of file. I can't reproduce the other today without getting an error.

I really mean to go to EOF

2009-03-19 Thread jidanni
You know those pesky error messages, nurdsome: line 17: warning: here-document at line 1 delimited by end-of-file (wanted `EOF') Well there should be a new 'trick': <<$EOF, <<\$EOF, or something, the meaning of which is 'I really mean to go all the way to the end of the file'. This is in additio

arithmetic + > + subshell might not be documented

2009-04-01 Thread jidanni
Might not be documented: $ cat q for i in : :; do :|: > x$((++a)); echo =$a=; done; ls x?; rm x? for i in : :; do : > x$((++b)); echo =$b=; done; ls x?; rm x? $ bash q == == x1 =1= =2= x1 x2

set -x prejudiced; won't smell UTF-8 coffee

2009-04-06 Thread jidanni
Gentlemen, -x's reporting should just pass the Chinese right back. $ set -x; export LC_ALL=$LANG; echo 中文 + export LC_ALL=zh_TW.UTF-8 + LC_ALL=zh_TW.UTF-8 + echo $'\344\270\255\346\226\207' 中文 Or OK, to be fair, even the ASCII should come back as octal escapes.

Re: set -x prejudiced; won't smell UTF-8 coffee

2009-04-06 Thread jidanni
Mike Frysinger writes: > exactly do you suggest differentiating... I don't know. It's all truly over my head. All I know is "how are you going to 'market' this stuff in Asia?". I mean the US kids get to see all their -x feedback pretty, but Asians must see it garbled. I don't know. Some kind of s

Re: set -x prejudiced; won't smell UTF-8 coffee

2009-04-07 Thread jidanni
Instead of having bash make judgements about what people want from their personal mix of: $ locale|sed 's/.*=//;s/"//g;/^$/d'|sort|uniq -c 2 C 11 zh_TW.UTF-8 instead just have a passthru option they could enable, that says "I hereby agree that I want to be sent raw -x output back, and if

Re: set -x prejudiced; won't smell UTF-8 coffee

2009-04-08 Thread jidanni
> locale variables have pretty clear definitions. obviously LC_COLLATE wouldnt > be relevant here, but LC_MESSAGES certainly would. Assumptions, assumptions, those happen to be the two C's for me. So let me override without having to tamper with them please.

Re: set -x prejudiced; won't smell UTF-8 coffee

2009-04-08 Thread jidanni
Mike Frysinger writes: > i never said you couldnt override them. i said the *default behavior* would OK, it's a deal. Now all that's left is for that Chet guy to implement it :-)

mention what characters need to be escaped inside [...]

2009-05-03 Thread jidanni
Maybe mention in the man page at [...] Matches any one of the enclosed characters... that one will need to backslash at least any spaces used inside it: $ ls [^ ] ls: cannot access [^: No such file or directory ls: cannot access ]: No such file or directory $ ls [^\ ] a

Re: mention what characters need to be escaped inside [...]

2009-05-04 Thread jidanni
Greg Wooledge writes: > quotes inside -- [^" "] -- works. But the backslash approach you used > is probably the clearest way to write it. Anyways, it should be mentioned in the man page's [...] discussion, even though legally one could say it is probably already mentioned, though scattered around

M-. rings bell if empty

2009-06-08 Thread jidanni
Type "# RET ESC ." Bash replies with a ^G Wouldn't it be more polite to just do nothing, instead of waking up the neighbors? $ expr 2 + 2 4 $ #e=mcHammer <-here I typed ESC # $ e=mc<-here I type ESC . ESC . in order to get the "2", but after the first ESC . I must endure the ^G slap in th

showing expansion bifurcation point better

2009-06-09 Thread jidanni
When showing choices, $ ls /cf/124451 1244516986.31615_0.ps11007 1244517019.1029_0.ps11007 maybe indicate the bifurcation point with termcap bold, like emacs, or with a pipe: 124451|6986.31615_0.ps11007 124451|7019.1029_0.ps11007 or just show the remaining part, like ...6986.31615_0.ps11007 ...7

line up completions vertically

2009-07-25 Thread jidanni
You know how it shows us the choices when we hit TAB, # rm /var/tmp/dan_home_bkp2009-07-26-02- dan_home_bkp2009-07-26-02-18-36.bz2 dan_home_bkp2009-07-26-02-27-07.bz2 Well given that we are not going to bother to make the differing endings bold, like in emacs, well, at least we can line them up v

history --no-numbers-please

2009-08-06 Thread jidanni
$ history needs a --no-numbers-please option (-u maybe?), as I can't recall when I didn't run the output through sed to get rid of them.

Re: history --no-numbers-please

2009-08-06 Thread jidanni
> "CR" == Chet Ramey writes: >> $ history needs a --no-numbers-please option (-u maybe?), as I can't >> recall when I didn't run the output through sed to get rid of them. CR> Why not just use fc -ln? Because "help history" didn't tip me off that I could try that. However $ history|wc -l 999

cd $x; rmdir $x; mkdir $x; ...

2009-09-11 Thread jidanni
ry: getcwd: cannot access parent directories: No such file or directory $ exit $ ls . $ ls -l total 0 $ ls -la total 0 $ ls -la . total 0 $ ls -la $PWD total 0 drwxr-xr-x 2 jidanni jidanni 60 2009-09-12 01:55 . drwxrwxrwt 9 rootroot440 2009-09-12 01:55 .. -rw-r--r-- 1 jidanni jidanni 0 2009-09-12 01:55 k

ESC SPC please

2009-11-27 Thread jidanni
Please implement emacs' M-SPC (translated from SPC) runs the command just-one-space, which is an interactive compiled Lisp function in `simple.el'. I mean you already implement M-\ (translated from \) runs the command delete-horizontal-space, which is an interactive compiled Lisp fun

Re: ESC SPC please

2009-11-28 Thread jidanni
PG> maybe try the following macro: PG> bind '"\M- ":"\M-\\ "' Sorry, that doesn't work on the command line or .inputrc. No effect.

want a M-. that ignores C-r

2009-12-18 Thread jidanni
Same question for years: Want some way for M-. to get the last item, regardless of if we are here via a C-r or not. I want some dumber-downed version of M-., however at the same time I don't want to use that cshell ! stuff. I want something I can bind to M-.. Thanks.

have bg, fg, but lack stop

2009-12-19 Thread jidanni
Notice how I need two steps to stop this running job: $ jobs [1]+ Running firefox & $ fg firefox ^Z [1]+ Stopped firefox As there is no $ stop %1 like command. OK, I suppose I can use $ kill -s SIGSTOP %1 $ [1]+ Stopped firefox OK, never mind.

are you sure you want to add all the <

2010-04-05 Thread jidanni
Are you sure you want to add all the <

allow printing completions vertically

2010-04-10 Thread jidanni
We read print-completions-horizontally (Off) If set to On, readline will display completions with matches sorted horizontally in alphabetical order, rather than down the screen. Maybe the above variable is mainly talking about sorting order, in

mention bind commands too

2010-04-10 Thread jidanni
On man bash _kindly_ mention there is indeed a way to use the following, with no further ado, by adding the stuff in parentheses: dump-functions (bind -P) Print all... dump-variables (bind -V) Print all... dump-macros (bind -S) Print al

match-hidden-files docstring

2010-04-10 Thread jidanni
We read match-hidden-files (On) This variable, when set to On, causes readline to match files whose names begin with a `.' (hidden files) when performing filename completion, unless the leading `.' is supplied by the user in t

  1   2   >