Re: When a hashed pathname is deleted, search PATH

2014-03-19 Thread Linda Walsh
Linda Walsh wrote: Sure, you could forget the timing part -- and have bash check for every child, it's reason for exiting and if ENOENT, then check whatever path the child was just spawned with if you wanted a general solution for a low-incident problem. It would still be better

Re: When a hashed pathname is deleted, search PATH

2014-03-19 Thread Linda Walsh
Chris Down wrote: Linda Walsh writes: If this was a reactor control program, that's one thing, but in deciding what solution to implement to save some small lookup time or throw it away, an 90% solution is probably fine. It's called a heuristic. AI machines use them. Thinking

Re: When a hashed pathname is deleted, search PATH

2014-03-19 Thread Linda Walsh
Mike Frysinger wrote: i already highlighted a technical way of solving it 100% of the time. -mike Wasn't that the method of incurring the existence check for all executions in the parent to check for the rare case that a hashed image that a child was about to execute didn't exist AND the

Re: When a hashed pathname is deleted, search PATH

2014-03-18 Thread Linda Walsh
Mike Frysinger wrote: On Tue 18 Mar 2014 01:04:03 Linda Walsh wrote: Chet Ramey wrote: Because the execution fails in a child process. You'd be able to fix it for that process, but would do nothing about the contents of the parent shell's hash table. The way the option works

Re: When a hashed pathname is deleted, search PATH

2014-03-18 Thread Linda Walsh
Chet Ramey wrote: Because the execution fails in a child process. You'd be able to fix it for that process, but would do nothing about the contents of the parent shell's hash table. The way the option works now is to check the hash lookups and delete anything that is no longer an executable f

Re: Bash-4.3-rc1 -- curious?

2014-02-22 Thread Linda Walsh
Chet Ramey wrote: On 1/25/14, 8:36 PM, Linda Walsh wrote: Also, haven't begin to look at "why", but something is alot slower in bash-43... To get to beginning of calling my first "personal .rc file": (~/.bashrc): bash43 shows: [ 109.999]/etc/profile

Re: Please accept M-p as well as C-p

2014-02-22 Thread Linda Walsh
Maybe not as convenient, but there's always (vi-mode) [fF]^j[lj] If it gets to be that jumping between lines is important I usually invoke the editor. If you are going to get into making a mini-editor that allows jumping between lines moving completion to something like Meta-tab or ctrl-tab woul

Re: Bash-4.3-rc1 - problems and other problems

2014-01-25 Thread Linda Walsh
Chet Ramey wrote: On 1/25/14, 8:36 PM, Linda Walsh wrote: I've no idea why there is such a large discrepancy at this point. All the non-release versions of bash enable extensive, exhaustive, and time-consuming malloc arena and allocation checking. That slows things considerably. Thi

Re: Bash-4.3-rc1 - problems and other problems

2014-01-25 Thread Linda Walsh
Chet Ramey wrote: On 1/24/14, 4:16 PM, Linda Walsh wrote: Trying to build, Get undefined reference to `sh_xfree' In function `write_helpfiles'. Anyone run into this... was it a mistake to try for separate help files? Thanks for the report. It's a simple patch, so I

Re: Bash-4.3-rc1 -- undefined reference to `sh_xfree'

2014-01-24 Thread Linda Walsh
Trying to build, Get undefined reference to `sh_xfree' In function `write_helpfiles'. Anyone run into this... was it a mistake to try for separate help files? Also get a warning out of gen-helpfiles.c: gen-helpfiles.c: In function ‘main’: gen-helpfiles.c:122:3: warning: call to function ‘write_

Re: flag for quiet CDPATH

2014-01-21 Thread Linda Walsh
Lionel Cons wrote: Yes, adding yet another option which can be implemented using POSIX behaviour is IMHO code bloat. Just use alias cd='2>"/dev/null" cd ' (yes, POSIX mandates that re-directions can be prefixed and not only postfixed). --- But the above doesn't work. The echo happens on stdo

Re: I think bash logic in a loop like : while [ condition] |read somevar is flawed.

2013-12-24 Thread Linda Walsh
rens wrote: this script: ___ export cval=0 echo entering while # listing ten files, to generate some output to count. ls -1 /usr/bin|head -10 |while read fname do cval=$(( cval +1 )) echo cval = $cval file = $fname done # one would think cval is now 10. but it is not, con

Re: Lengthy working dir (\w) breaks wrapping in a multi line coloured PS1 prompt

2013-12-24 Thread Linda Walsh
Use something to trim your prompt usefully (or rigidly like bash prompt builtin '\w'): --- in your .bashrc define these: # return a shorted path when displayed path would take up > 50% width of screen alias int=declare\ -i _e=echo _pf=printf exp=export ret=return exp __dpf__='local -a P

Re: soft-bug (should be in planning queue)...

2013-12-21 Thread Linda Walsh
Chet Ramey wrote: On 12/21/13, 4:32 PM, Linda Walsh wrote: According to the change log, this was fixed in mid-July 2012. In what release? ... it doesn't seem to be 4.2.45/suse-linux ;-( It's in the devel branch and will be in bash-4.3. Did you mean july 2013? Otherwi

Re: soft-bug (should be in planning queue)...

2013-12-21 Thread Linda Walsh
In what release? ... it doesn't seem to be 4.2.45/suse-linux ;-( Chet Ramey wrote: On 12/19/13, 6:02 PM, Linda Walsh wrote: declare -u word word='aαβb' echo $word AαβB bash is not raising the case of UTF8 lower case letters (lower case alpha & beta (αβ=>ΑΒ). Accor

Fwd: soft-bug (should be in planning queue)...

2013-12-19 Thread Linda Walsh
declare -u word word='aαβb' echo $word AαβB bash is not raising the case of UTF8 lower case letters (lower case alpha & beta (αβ=>ΑΒ). It doesn't have to be fixed by tomorrow, but next week would be fine... ;-) (that schedule was indented as humor...) I think it *is* something that should be i

Re: why are \d and \D not implemented but don't throw errors in regex?

2013-12-11 Thread Linda Walsh
On 12/10/2013 12:44 PM, Eric Blake wrote: On 12/10/2013 01:28 PM, Linda Walsh wrote: But before bash takes on another library, it would be nicer to FIRST get libc patched to provide pcre regex by default. In other words, I think you are better off lobbying with the POSIX folks to standardize

Re: why are \d and \D not implemented but don't throw errors in regex?

2013-12-10 Thread Linda Walsh
On 12/10/2013 12:44 PM, Eric Blake wrote: Grep uses a third-party library (libpcre) to provide it's third syntax; if that library is not present at compilation, then you can't use that flavor. So maybe bash could look into using libpcre as well. But my personal problem with libpcre is that it

Re: why are \d and \D not implemented but don't throw errors in regex?

2013-12-10 Thread Linda Walsh
On 12/7/2013 3:33 PM, Peter Cordes wrote: I agree your complaint seems valid, but it's the behaviour of the regex engine built into GNU libc (in this case). Bash on other platforms would use the regex engine in their system libc. (Unless I'm mistaken in my assumption that bash doesn't have i

Re: savannah.gnu.org bug tracker unused?

2013-12-04 Thread Linda Walsh
On 11/28/2013 10:00 AM, Chet Ramey wrote: It's true. I rarely look there. bug-bash is the preferred conduit for bug reports. > https://savannah.gnu.org/support/index.php?108163 > probably invalid, pasting giant buffers into bash loses characters > because of lack of pseudo tty flow control,

RFE: pre-load hist-file from a R/O file

2013-11-14 Thread Linda Walsh
Maybe like some people, I'm playing around w/saving and storing my .histfiles .. not on a line-by-line basis, but with the histfiles sorted, & merged & erase dups in effect and intention of throwing out short commands (one to 2-3 words) I have most of that working , though right now the merging s

bug-bash@gnu.org

2013-10-28 Thread Linda Walsh
On 10/28/2013 3:47 PM, Eric Blake wrote: What's wrong with: !(*-IGN-*) -- Thanks 2!

bug-bash@gnu.org

2013-10-28 Thread Linda Walsh
On 10/28/2013 3:47 PM, Chris F.A. Johnson wrote: Is there a better bash-pattern that doesn't use tr and such? ls !(*-IGN-*) --- Seems perfect... Had a slightly more complex usage (filtering MS packages) but it seems to work: ls !(*_@(en-us|none)*) Thanks!

bug-bash@gnu.org

2013-10-28 Thread Linda Walsh
On 10/28/2013 3:35 PM, Linda Walsh wrote: ls !($(echo *+(-IGN-)*|tr " " "|")) I tried the above in a dir that has 2 files w/the pattern, and 532 w/o, and it worked, but how much of that was 'luck'? --- Slight improvement -- but still not a direct bash pattern: !($(printf "%s|" *+(-IGN-)*))

bug-bash@gnu.org

2013-10-28 Thread Linda Walsh
I am missing how to create a bash-pattern that excludes a specific pattern. I.e. to ignore any file with '-IGN-' somewhere in the filename. The best I've come up with so far has been to use shell to build a pattern, but I know it is limited in functionality. I.e.: ls !($(echo *+(-IGN-)*|tr " "

RFE: readarray "-0" (or reciprocal of printf "%s\x00" "${AR[@]}" )

2013-08-23 Thread Linda Walsh
I was doing some file tree tests, and just noticed, I can print out file names with nulls at the end of them from an array with printf (neat!) However, has any thought (or is there a way already?) to read in a bunch of null terminated names from the output of such a construct?

Re: feature request: file_not_found_handle()

2013-08-21 Thread Linda Walsh
Chris Down wrote: On 2013-08-20 18:47, Linda Walsh wrote: If it wasn't for things doing what we don't expect, many things wouldn't be around (aspirin, popcorn, digitalis, Rogain, & tons more... most things are found by NOT using them they way you are directed to use them

Re: feature request: file_not_found_handle()

2013-08-20 Thread Linda Walsh
Roman Rakus wrote: You are badly using features of bash. Write a script which will do things for you, or use any other language/shell. --- Why? Please, accept this response as a suggestion. --- Seems to be a bit provincial. command_not_found_handle is designed to do other things than you

Re: i++ cause bad return code when result is 1

2013-08-19 Thread Linda Walsh
David Lehmann wrote: The ((i++)) fails only when the result is 1. --- What are you calling the result? The return value or the post-incremented value of 'i', which is done *after* the return-result is returned? I.e. you are talking 2 different point of return (that's one issue). Second, o

Re: feature request: file_not_found_handle()

2013-08-19 Thread Linda Walsh
Ken Irving wrote: On Sun, Aug 18, 2013 at 06:30:47PM -0700, Linda Walsh wrote: Chet Ramey wrote: On 8/14/13 7:44 AM, Andreas Gregor Frank wrote: Hi, i think a file_not_found_handle() or a modified command_not_found_handle(), that does not need an unsuccessful PATH search to be triggered

Re: child_pid of background process? (not in manpage?)

2013-08-19 Thread Linda Walsh
Chet Ramey wrote: On 8/19/13 1:52 PM, Linda Walsh wrote: That explains it... There's -- in searching the output, I'm pretty sure that seeing a stray '!' in the left hand margin wouldn't have looked like a var. In this case, especially for the 1 char vars, wouldn'

Re: child_pid of background process? (not in manpage?)

2013-08-19 Thread Linda Walsh
Chris Down wrote: On 2013-08-18 17:46, Linda Walsh wrote: I don't find the variable for the process ID of the last started background process documented in the bash manpage... Am I just missing it, or did it get left out by accident or where did it go? First of all, it would help i

Re: feature request: file_not_found_handle()

2013-08-18 Thread Linda Walsh
Chet Ramey wrote: On 8/14/13 7:44 AM, Andreas Gregor Frank wrote: Hi, i think a file_not_found_handle() or a modified command_not_found_handle(), that does not need an unsuccessful PATH search to be triggered, would be useful and consistent. The original rationale for command_not_found_hand

child_pid of background process? (not in manpage?)

2013-08-18 Thread Linda Walsh
I don't find the variable for the process ID of the last started background process documented in the bash manpage... Am I just missing it, or did it get left out by accident or where did it go? ($!)

Re: Arithmetic assignment side-effects

2013-08-04 Thread Linda Walsh
Dan Douglas wrote: On Sunday, August 04, 2013 06:08:18 PM Linda Walsh wrote: From the bash manpage, it would see that += is higher precedence than assignment, so the increment would be done first, followed by the attempt at an assignment of 1 to 1. = and += have equal precedence

Re: Arithmetic assignment side-effects

2013-08-04 Thread Linda Walsh
Chris Down wrote: Yes, I agree, it becomes ambiguous when described in this fashion. I think the aesthetics of x+=y vs x=x+y are important here. From the bash manpage, it would see that += is higher precedence than assignment, so the increment would be done first, followed by the attempt at a

Re: Minor bug declaring arrays of integers: dcl -ai=>broken, dcl -ia=>ok

2013-07-27 Thread Linda Walsh
*meOW*talk about catty Chet Ramey wrote: On 7/22/13 9:07 AM, Chet Ramey wrote: The issue is whether or not attributes that determine how the assignment should be treated (-a/-A) or how the variable should be created (-g) are handled specially and affect how the value is expanded. The que

Re: History file clobbered by multiple simultaneous exits

2013-07-26 Thread Linda Walsh
Geoff Kuenning wrote: Instead of "junk", secure file systems mark it as needing to be zeroed. Perhaps instead of zeroing it ext3 simply marks it of zero length? Imagine, embedded in the junk are credit cards and passwords and you'll begin to understand why zero pages are kept "in-stoc

Re: History file clobbered by multiple simultaneous exits

2013-07-25 Thread Linda Walsh
Geoff Kuenning wrote: I can also see the possibility of some kernel or file system routine waiting after you issue the close call so that it doesn't have to zero the area where data is arriving. I.e. it might only zero the file beyond the valid text AFTER some delay (5 seconds?) OR might wai

Re: History file clobbered by multiple simultaneous exits

2013-07-24 Thread Linda Walsh
Geoff Kuenning wrote: > Linda: > > I actually don't use histappend; I like the fact that history eventually > disappears. I'm not one to try to sell something so trivial, but do you really never have a project that lasts more than 1 login session where repeat commands would be usefu

Re: Minor bug declaring arrays of integers: dcl -ai=>broken, dcl -ia=>ok

2013-07-23 Thread Linda Walsh
Chet Ramey wrote: > On 7/21/13 10:35 PM, Dan Douglas wrote: > > > What's the bug? I can't reproduce this and always get "xx" no mater the > > option > > order. > > > > I always assumed the -i attribute doesn't get set until after assigning the > > values, which is why: > > > > $ ( declare

Re: Minor bug declaring arrays of integers: dcl -ai=>broken, dcl -ia=>ok

2013-07-22 Thread Linda Walsh
Dan Douglas wrote: > On Sunday, July 21, 2013 08:39:29 PM Linda Walsh wrote: >> I don't think so. Not from the above. >> >> The first sets up an array outside the function composed of integers, >> so the 2nd time I execute the same, it gets put through the &

Re: Minor bug declaring arrays of integers: dcl -ai=>broken, dcl -ia=>ok

2013-07-21 Thread Linda Walsh
Dan Douglas wrote: > On Sunday, July 21, 2013 04:13:31 PM Chet Ramey wrote: >> (For what it's worth, I don't see a difference in the output no matter what >> the option order.) >> Chet > > What's the bug? I can't reproduce this and always get "xx" no mater the > option > order. Ye

Re: History file clobbered by multiple simultaneous exits

2013-07-19 Thread Linda Walsh
Geoff Kuenning wrote: > But right now, if all three of those shells exit simultaneously--for > whatever reason--there is a significant probability that the history > file will end up zero-length. That's not theoretical; I've experienced > it multiple times. And that's a bug, plain and simple.

Re: History file clobbered by multiple simultaneous exits

2013-07-18 Thread Linda Walsh
Geoff Kuenning wrote: ge...@cs.hmc.edu wrote: Locking should be used when truncating and writing the history file. (Yes, I know it's a pain in a portable program like bash.) What might be cooler would be to merge all the history lines from all shells

Re: Determining the type of environment entry from Perl

2013-07-17 Thread Linda Walsh
Ole Tange wrote: GNU Parallel can today successfully transfer bash environment values through ssh to the remote host: FOO=xyz export FOO parallel --env FOO -S server 'echo $FOO' ::: bar That's likely because it has been trained to encode variables in a way that the other sid

Re: cd completion using aliased cd command

2013-07-16 Thread Linda Walsh
Oh... you are quoting spaces...cygwin...Win...sorry, took a bit... in the midst of my own MS-induced distraction...(last updates made sys non-bootable and broke sys-restore). No recent backups, so reinstall new, and trying to restore old settings from old registry... oh what fun -- I am posting

Re: devel source tree? (doc page outdated or something broken?)

2013-07-16 Thread Linda Walsh
Greg wrote: http://savannah.gnu.org/git/?group=bash Chet Ramey wrote: The devel branch is part of the git tree, not cvs. Thanks, ... um, doesn't that mean the doc page is a bit misleading for the code portion of the source?? (no need to answer, just something to think about in your 'spar

devel source tree? (doc page outdated or something broken?)

2013-07-14 Thread Linda Walsh
I was trying to find the location of the current development source. I followed the access instructions at: https://savannah.gnu.org/cvs/?group=bash but got no files (got 2 dirs: CVSROOT and bash, but nothing in either of them). I take it that page is out of date or is something broken? Th

Minor bug declaring arrays of integers: dcl -ai=>broken, dcl -ia=>ok

2013-07-14 Thread Linda Walsh
In order to declare an array of type int (or an integer array) I first tried: declare -ai -g foo=(1 2 xx 3) echo "${foo[@]}" 1 2 xx 3 <-incorrect So then tried: declare -ia -g foo=(1 2 xx 3) echo "${foo[@]}" 1 2 0 3 <-correct! It seems 'declare' is sensitive to the or

Re: Troublesome checkwinsize (none) behaviour

2013-07-13 Thread Linda Walsh
wer...@suse.de wrote: Description: As subject says: * If checkwinsize is _not_ set the bash does not update the internal LINES and COLUMNS varaible during a command/job is running in foreground on same terminal. --- Right. * If checkwinsize

Re: having bash display real tabs for tab characters...

2013-07-11 Thread Linda Walsh
Eric Blake wrote: On 07/11/2013 04:06 PM, Linda Walsh wrote: Revisiting this... Chet Ramey wrote: On 4/25/13 8:45 AM, Greg Wooledge wrote: If you think Bash is misbehaving, submit a patch, or wait for Chet to comment on one of these threads. I don't plan to comment or make any ch

Re: having bash display real tabs for tab characters...

2013-07-11 Thread Linda Walsh
Eric Blake wrote: On 07/11/2013 04:06 PM, Linda Walsh wrote: Revisiting this... Chet Ramey wrote: On 4/25/13 8:45 AM, Greg Wooledge wrote: If you think Bash is misbehaving, submit a patch, or wait for Chet to comment on one of these threads. I don't plan to comment or make any ch

Re: having bash display real tabs for tab characters...

2013-07-11 Thread Linda Walsh
Revisiting this... Chet Ramey wrote: On 4/25/13 8:45 AM, Greg Wooledge wrote: If you think Bash is misbehaving, submit a patch, or wait for Chet to comment on one of these threads. I don't plan to comment or make any changes. The demand for this feature seems vanishingly small. And

Re: History file clobbered by multiple simultaneous exits

2013-07-11 Thread Linda Walsh
ge...@cs.hmc.edu wrote: Locking should be used when truncating and writing the history file. (Yes, I know it's a pain in a portable program like bash.) Strictly speaking, locking is only half a solution, because the net result will be that the saved his

Re: PS1 multiline with colors

2013-07-08 Thread Linda Walsh
Greg Wooledge wrote: normal=$(tput sgr0) red=$(tput setaf 1) green=$(tput setaf 2) ... --- BTW If you ever trace your code with "-x", tracing through the above will change your terminal text color. You can get around that by using read: read _CRST < <(tput sgr0) #Reset read _CRed < <(

Re: typeset -p & manpage on it are confusing w/rt funcs

2013-07-08 Thread Linda Walsh
Chet Ramey wrote: On 6/6/13 6:48 PM, Linda Walsh wrote: I wanted to test to see if a function was defined and looking at typeset in the bash man page, I see typeset ... The -p option will display the attributes and values of each name. When -p is used with name

Re: locale specific ordering in EN_US vs. characterset collation rules for UTF-8

2013-06-28 Thread Linda Walsh
Paolo Bonzini wrote: Il 28/06/2013 07:04, Linda Walsh ha scritto: > > Chet Ramey wrote: >> The world is larger than glibc and the glibc locale definitions. We need >> a solution that encompasses all of it. That solution should, and maybe >> will, include glibc, but t

Problem inserting Unicode heavy minus sign (U+2796)

2013-06-27 Thread Linda Walsh
Have an oddity in bash. Tried to insert the heavy minus sign and I get deterministic garbage: echo "^K$"|hexdump 000 9ee2 0b01 0a24 vs. if I use 'cat', or just raw input to hexdump: hexdump ➖000 9ee2 0096 003 (that minus sign before the first lin

Re: locale specific ordering in EN_US vs. characterset collation rules for UTF-8

2013-06-27 Thread Linda Walsh
Chet Ramey wrote: The world is larger than glibc and the glibc locale definitions. We need a solution that encompasses all of it. That solution should, and maybe will, include glibc, but that is not sufficient by itself. I don't suppose it is possible to use the Unicode collatio

Re: regex confusion -- not matching; think it should?

2013-06-19 Thread Linda Walsh
DJ Mills wrote: On Wed, Jun 12, 2013 at 6:53 PM, Linda Walsh <mailto:b...@tlinx.org>> wrote: The trace looks aprolike this: ./ifc#137(handle_bonding_ops)> (( 18>3 )) ./ifc#138(handle_bonding_ops)> [[ mode=balance-rr 0 =~ ^([a

Re: `printf -v foo ""` does not set foo=

2013-06-16 Thread Linda Walsh
Mike Frysinger wrote: simple test code: unset foo printf -v foo "" echo ${foo+set} that does not display "set". seems to have been this way since the feature was added in bash-3.1. -mike Indeed: set -u unset foo printf -v foo "" echo $foo bash: foo: unbo

Re: corrupted input after size function (input that's not recorded by bash)

2013-06-16 Thread Linda Walsh
Dave Gibson wrote: Trial and error suggests it's something to do with new-style command substitution. Try backticks: local s=`stty size` Yes... you are right. This works... while local s=$(stty size) does not. That's icky! I thought they were identical, they appea

Re: currently doable? Indirect notation used w/a hash

2013-06-15 Thread Linda Walsh
John Kearney wrote: Sorry forgot the bit to retrive values It is possible to retrive numeric values without eval i.e. val=$((${ArrayName}[Index])) works quiet well and is quick, in fact I used to use this quiet a lot. There is also a backdoor approach that I don't really advise. val="${A

Re: currently doable? Indirect notation used w/a hash

2013-06-14 Thread Linda Walsh
Chris Down wrote: On 14 Jun 2013 10:21, "Linda Walsh" wrote: Please, no more brittle export hacks. I'm already crying enough at function exports. Brittle would be bad. Pliant and chewy would be much better, I agree. Perhaps you might explain what you mean by brittle?

Re: corrupted input after size function (input that's not recorded by bash)

2013-06-14 Thread Linda Walsh
Greg Wooledge wrote: This makes me continue to suspect that the problem is being triggered by something else in your setup (possibly multiple things working together). You might try to reproduce the problem in a simpler setup, to see if you can isolate what factors must be present for it to o

Re: currently doable? Indirect notation used w/a hash

2013-06-14 Thread Linda Walsh
Chris Down wrote: Chet Ramey wrote: >> Now I want to access the value for IP for the current "IF" (IF holding >> eth0 or eth1 or some other InterFace name). > This is an excellent statement of the rationale for nameref variables, > which will be implemented in bash-4.3. That or

Re: corrupted input after size function (input that's not recorded by bash)

2013-06-13 Thread Linda Walsh
Dennis Williamson wrote: read _CRST < <(tput sgr0) instead of _CRST=$(tput sgr0) Run both of them with trace turned on and you'll find out. ;-) I used to have the 2nd one...got tired of having my tracing change colors when it got to that...

Re: currently doable? Indirect notation used w/a hash

2013-06-13 Thread Linda Walsh
Chet Ramey wrote: Now I want to access the value for IP for the current "IF" (IF holding eth0 or eth1 or some other InterFace name). This is an excellent statement of the rationale for nameref variables, which will be implemented in bash-4.3. That order fries wouldn't happen to

Re: corrupted input after size function (input that's not recorded by bash)

2013-06-13 Thread Linda Walsh
Chris F.A. Johnson wrote: On Thu, 13 Jun 2013, Linda Walsh wrote: I have a small function in my bashrc: function showsize () {\ local s=$(stty size); local o="(${s% *}x${s#* })"; s="${#o}";\ echo -n $o; while ((s-- > 0));do echo -ne "\b"; done; \ } export -

Re: corrupted input after size function (input that's not recorded by bash)

2013-06-13 Thread Linda Walsh
Greg Wooledge wrote: On Thu, Jun 13, 2013 at 12:58:02PM -0700, Linda Walsh wrote: So how can my showsize function be mangling the input in a way that prevents proper execution, but isn't recorded by bash? What makes you believe it's this function that's causing your p

Re: corrupted input after size function (input that's not recorded by bash)

2013-06-13 Thread Linda Walsh
It only happens when I alter the window size and the window size is printed out. Greg Wooledge wrote: On Thu, Jun 13, 2013 at 12:58:02PM -0700, Linda Walsh wrote: So how can my showsize function be mangling the input in a way that prevents proper execution, but isn't recorded by bash?

corrupted input after size function (input that's not recorded by bash)

2013-06-13 Thread Linda Walsh
I have a small function in my bashrc: function showsize () {\ local s=$(stty size); local o="(${s% *}x${s#* })"; s="${#o}";\ echo -n $o; while ((s-- > 0));do echo -ne "\b"; done; \ } export -f showsize trap showsize SIGWINCH --- That has the effect of showing me my current window size when I

Re: bug batch

2013-06-13 Thread Linda Walsh
I can't speak to all your cases, but I had comments on a few: Dan Douglas wrote: Most shells (and GCC) consider not grouping the assignment in a situation like this an error. Bash tolerates it, apparently reversing associativity: : $((1 == x = 1)) # Error in dash/ksh/mksh/zsh/etc

Re: regex confusion -- not matching; think it should?

2013-06-12 Thread Linda Walsh
Linda Walsh wrote: The trace looks aprolike this: ./ifc#137(handle_bonding_ops)> (( 18>3 )) ./ifc#138(handle_bonding_ops)> [[ mode=balance-rr 0 =~ x^-extra space at least it works now!

regex confusion -- not matching; think it should?

2013-06-12 Thread Linda Walsh
The trace looks aprolike this: ./ifc#137(handle_bonding_ops)> (( 18>3 )) ./ifc#138(handle_bonding_ops)> [[ mode=balance-rr 0 =~ ^([a-zA-Z][-a-zA-Z0-9_]+)=(.+)[[:space:]]+[a-zA-Z][-a-zA-Z0-9_]+=.+.*$ ]] ./ifc#142(handle_bonding_ops)> [[ mode=balance-rr 0 =~ ^([a-zA-Z][-a-zA-Z0-9_]+)=(.+)

Re: currently doable? Indirect notation used w/a hash

2013-06-10 Thread Linda Walsh
Linda Walsh wrote: Chris F.A. Johnson wrote: What's wrong with: rm -rf * 1) it may or may not ignore hidden files depending on shell settings. 2) it crosses into mounted files systems Forgot an important one: 3) Follows symlinks in the directory you are deleting in. (so if

Re: currently doable? Indirect notation used w/a hash

2013-06-10 Thread Linda Walsh
Chris F.A. Johnson wrote: What's wrong with: rm -rf * 1) it may or may not ignore hidden files depending on shell settings. 2) it crosses into mounted files systems

Re: currently doable? Indirect notation used w/a hash

2013-06-10 Thread Linda Walsh
Point taken, but the only way such a string would be passed as a variable name is if it was given as user input -- which would, presumably, be sanitized before being used. Programming it literally makes as much sense as 'rm -rf /'. --- That still didn't POSIX-Gnu rm from disabli

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

2013-06-10 Thread Linda Walsh
Mike Frysinger wrote: pretty sure the linux kernel (and others?) would return ETXTBSY and not even allow the write I think that's a relatively new innovation -- i.e. since the ability to setup read-only code segments was implemented, though FWIW, you are right. I think it

Re: currently doable? Indirect notation used w/a hash

2013-06-10 Thread Linda Walsh
Pierre Gaston wrote: bash4 has associative arrays: declare -A array array[foobar]=baz echo "${array[foobar]}" --- Right, and bash's namespace is also an associative array -- names & values. In the main namespace you can use '!' to introduce indirection, but not in a generalized way. i.e.

currently doable? Indirect notation used w/a hash

2013-06-09 Thread Linda Walsh
I was wondering if I was missing some syntax somewhere... but I wanted to be able to pass the name of a hash in and store stuff in it and later retrieve it... but it looks like it's only possible with an eval or such? Would be nice(??)*sigh*

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

2013-06-09 Thread Linda Walsh
jida...@jidanni.org wrote: All I know is there I am in emacs seeing things in the output of a running bash script that I want to tweak and get busy tweaking and saving changes before the script finishes, thinking that all this stuff will be effective on the next run of it, when lo and behold n

Re: typeset -p & manpage on it are confusing w/rt funcs

2013-06-08 Thread Linda Walsh
Greg Wooledge wrote: On Thu, Jun 06, 2013 at 03:48:09PM -0700, Linda Walsh wrote: I wanted to test to see if a function was defined imadev:~$ declare -f foo >/dev/null 2>&1 ; echo $? 1 imadev:~$ declare -f bar >/dev/null 2>&1 ; echo $? 0 Obsolete. See `help declare&

typeset -p & manpage on it are confusing w/rt funcs

2013-06-06 Thread Linda Walsh
I wanted to test to see if a function was defined and looking at typeset in the bash man page, I see typeset ... The -p option will display the attributes and values of each name. When -p is used with name arguments, additional options are ignored. When -p is

Re: getting weird output out of 'echo' w/args

2013-05-30 Thread Linda Walsh
Chris Down wrote: > On 30 May 2013 17:59, Linda Walsh wrote: >> Generally don't feel good about that op except in very narrow >> circumstances...for exactly those types of reasons...what you >> can't see CAN hurt you! ;-) > > It doesn't have anythin

Re: getting weird output out of 'echo' w/args

2013-05-30 Thread Linda Walsh
Pierre Gaston wrote: > ok sorry for not having try my example, my point is that it was not > assigning to a[0] because of the nullglob and that this one can be > hard to spot --- Generally don't feel good about that op except in very narrow circumstances...for exactly those types of reasons...w

Re: getting weird output out of 'echo' w/args

2013-05-29 Thread Linda Walsh
Chet Ramey wrote: > On 5/29/13 9:08 PM, Linda Walsh wrote: >> Why would I get this: >> >>> echo "gtk-2.0/2.10.0/engines/liboxygen-gtk.so >>> [u::rwx,u:law:rwx,g::r-x,m::rwx,o::r-x]" >> gtk-2.0/2.10.0/engines/liboxygen-gtk.so >> [u::rwx,u:l

getting weird output out of 'echo' w/args

2013-05-29 Thread Linda Walsh
Why would I get this: > echo "gtk-2.0/2.10.0/engines/liboxygen-gtk.so > [u::rwx,u:law:rwx,g::r-x,m::rwx,o::r-x]" gtk-2.0/2.10.0/engines/liboxygen-gtk.so [u::rwx,u:law:rwx,g::r-x,m::rwx,o::r-x] > echo gtk-2.0/2.10.0/engines/liboxygen-gtk.so > [u::rwx,u:law:rwx,g::r-x,m::rwx,o::r-x] gtk-2.0/2.10.

Re: Odd problem developed recently interactive flag, 'flickering'

2013-05-23 Thread Linda Walsh
Nevermind... :-| <*bang* (I had ${-/i} when I meant ${-//[^i]/}; not sure what I was thinking!)

Odd problem developed recently interactive flag, 'flickering'

2013-05-23 Thread Linda Walsh
I have a few files run at login (could be one big file, bug modularized by function)... I did a 'sudo' and caught caught by this... I hve a check to see if I am in an interactive session, if so I do some more stuff than if I was being called in a shell file. I turned on a debug line that prints

Re: bash doesn't display tabs for tabs -- ignores tabstops.

2013-05-15 Thread Linda Walsh
Eduardo Bustamante wrote: > The cool thing about free software is that you're free to submit > patches. Please consider that option, instead of ranting on what Chet > should do. > --- Ranting? Chet seemed to indicate he wouldn't accept a patch. If, OTOH, he left that open... then, you are rig

Re: bash doesn't display tabs for tabs -- ignores tabstops.

2013-05-15 Thread Linda Walsh
Chet Ramey wrote: > On 4/25/13 8:45 AM, Greg Wooledge wrote: > >> If you think Bash is misbehaving, submit a patch, or wait for Chet to >> comment on one of these threads. > > I don't plan to comment or make any changes. The demand for this feature > seems vanishingly small. --- It's c

Re: bash doesn't display tabs for tabs -- ignores tabstops.

2013-04-30 Thread Linda Walsh
Chet Ramey wrote: > On 4/25/13 8:45 AM, Greg Wooledge wrote: > >> If you think Bash is misbehaving, submit a patch, or wait for Chet to >> comment on one of these threads. > > I don't plan to comment or make any changes. The demand for this feature > seems vanishingly small. Delib

Re: bash doesn't display tabs for tabs -- ignores tabstops.

2013-04-26 Thread Linda Walsh
Greg Wooledge wrote: > On Wed, Apr 24, 2013 at 08:02:29PM -0700, Linda Walsh wrote: >> My terminal is displayed via 'X' --- X pics up >> the actual characters that were echoed to the screen. If TABS are >> used, it put's TABS in the copy/paste-buffer. &g

Re: bash doesn't display tabs for tabs -- ignores tabstops.

2013-04-24 Thread Linda Walsh
Greg Wooledge wrote: > On Tue, Apr 23, 2013 at 11:42:34PM -0700, Linda Walsh wrote: >> Was my elaboration clear enough -- ? >> >> It's a display issue not a content issue -- except when you cut/paste >> from the terminal to another buffer under X. > > You for

Re: bash doesn't display tabs for tabs -- ignores tabstops.

2013-04-22 Thread Linda Walsh
Greg Wooledge wrote: > > Which means I typed <'> > <'> at the Bash prompt. > > Then I pressed(I use vi editing mode also). > > Inside vi(m), I verified that the stuff in front of the y is an actual > Tab character. --- The problem is not that it replaces with space in the user-

Re: bash doesn't display tabs for tabs -- ignores tabstops.

2013-04-22 Thread Linda Walsh
Greg Wooledge wrote: > Are you perhaps pressing Ctrl-V Tab? Or have you done funny things with > readline bindings? Or are you editing .bash_history with a text editor > and then re-invoking bash in order to artificially insert a command > with literal tabs into the shell's history buffer? ---

Re: bash doesn't display tabs for tabs -- ignores tabstops.

2013-04-22 Thread Linda Walsh
p.s. -- sorry for double post... but the fact that bad-design trumps user usage steams me. > Greg Wooledge wrote: >> On Mon, Apr 22, 2013 at 10:54:35AM -0700, Linda Walsh wrote: >>> Type in this: >>> echo 'while read fn;do >>> d=${fn%.zip} >> This

Re: bash doesn't display tabs for tabs -- ignores tabstops.

2013-04-22 Thread Linda Walsh
Greg Wooledge wrote: > On Mon, Apr 22, 2013 at 10:54:35AM -0700, Linda Walsh wrote: >> Type in this: >> echo 'while read fn;do >> d=${fn%.zip} > > This is where I lose you completely. If I press Tab where you indicate, > nothing happens at all. --- But that

<    1   2   3   4   5   6   7   >