support /etc/inputrc as a system-wide fallback default ?

2006-02-04 Thread Mike Frysinger
we've been using a patch in Gentoo for sometime which adds support 
for /etc/inputrc as a fallback after $INPUTRC and ~/.inputrc ... i couldnt 
seem to find anything in the archives where someone proposed this be added to 
readline, but maybe i just missed it ?
-mike


___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


Re: support /etc/inputrc as a system-wide fallback default ?

2006-02-04 Thread Dmitry V. Levin
Hi,

On Sat, Feb 04, 2006 at 03:27:19PM -0500, Mike Frysinger wrote:
> we've been using a patch in Gentoo for sometime which adds support 
> for /etc/inputrc as a fallback after $INPUTRC and ~/.inputrc ... i couldnt 
> seem to find anything in the archives where someone proposed this be added to 
> readline, but maybe i just missed it ?

I believe this idea comes from Debian and is used also in other distros
including ALT and Owl, see e.g.
http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/bash/readline-5.1-deb-alt-inputrc.diff

Yes, it looks not yet submitted.


-- 
ldv


pgpN2wVAc5zHk.pgp
Description: PGP signature
___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


Re: support /etc/inputrc as a system-wide fallback default ?

2006-02-04 Thread Mike Frysinger
On Saturday 04 February 2006 18:35, Dmitry V. Levin wrote:
> I believe this idea comes from Debian and is used also in other distros
> including ALT and Owl, see e.g.
> http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/bash/readline-5.1-de
>b-alt-inputrc.diff
>
> Yes, it looks not yet submitted.

that isnt how Gentoo has been handling it ... that patch falls back to reading 
both /etc/inputrc *and* ~/.inputrc ...

we've been using the policy of:
  1. the filename used for the previous call
  2. the value of the shell variable `INPUTRC'
  3. ~/.inputrc
  4. /etc/inputrc
which makes more sense to me ... if you want your ~/.inputrc to also use 
the /etc/inputrc, then you should use an include directive yourself in 
~/.inputrc rather than it always being forced ...
-mike


___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


Re: Bug in realloc_jobs_list()

2006-02-04 Thread Mike Frysinger
On Friday 03 February 2006 17:50, Jan Niehusmann wrote:
> realloc_jobs_list() in bash 3.1 doesn't zero out the unused entries of
> the jobs[] array, so bash may segfault later when trying to dereference
> these entries.

this has already been reported & fixed, download patch #7 for bash-3.1
-mike


___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


Re: problem ? bug ?

2006-02-04 Thread Mike Frysinger
On Sunday 05 February 2006 00:41, Paul Jarc wrote:
> [EMAIL PROTECTED] wrote:
> > [kaneda<-ogorasek]~$if [ ! -a /etc/passwd ] ; then echo si ; fi
>
> -a is used as a binary "and" operator here.  The expressions "!" and
> "/etc/passwd" are nonempty strings, so both are considered true, and
> the overall result is true.

better to read the existing history thus far on the -a subject
http://lists.gnu.org/archive/html/bug-bash/2006-01/msg00015.html
-mike


___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


problem ? bug ?

2006-02-04 Thread kaneda

Hello...


from man bash

  -a file
  True if file exists.
  -e file
  True if file exists.

and -a dosnt work good:

[kaneda<-ogorasek]~$if [ ! -a /etc/passwd ] ; then echo si ; fi
si
[kaneda<-ogorasek]~$if [ -a /etc/passwd ] ; then echo si ; fi
si

GNU bash, version 3.00.16(2)-release (i486-slackware-linux-gnu)

Linux ogorasek 2.4.31 #2 czw paź 20 02:28:57 CEST 2005 i686 unknown 
unknown GNU/Linux


gcc version 3.3.6


best regards



--
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]..
[+] You can take our lives,but you will never take our Freedom - W.Wallace
[+] Peace on earth depends on the peace in the peoples hearts - Dalai Lama
[+] Revolution the only solution - System of a down...
[+] Dalej idac dalej dojdziesz dalej siedzac dalej siedzisz - etoe aka ok0
[-] Kanedaaa... Bohateur... Cucumber Team Member... [EMAIL PROTECTED]___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


Bug in realloc_jobs_list()

2006-02-04 Thread Jan Niehusmann
realloc_jobs_list() in bash 3.1 doesn't zero out the unused entries of
the jobs[] array, so bash may segfault later when trying to dereference
these entries. A reliable way to reproduce the segfault, at least on
i386 linux, is

% seq 0 1 | while read line; do /bin/echo $line ; done | tail -2
4095
4096

This behaviour was reported by Laird Breyer <[EMAIL PROTECTED]> in the
debian bug tracking system.
(See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=347695 for
details)

The fix is quite simple:

--- bash/jobs.c.orig2006-02-03 22:27:07.0 +0100
+++ bash/jobs.c 2006-02-03 22:27:58.0 +0100
@@ -858,6 +858,9 @@
   for (i = j = 0; i < js.j_jobslots; i++)
 if (jobs[i])
   nlist[j++] = jobs[i];
+  
+  for (i=j; i 0) ? j - 1: 0;



___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


regression with color prompt + utf8

2006-02-04 Thread Egmont Koblinger
Configuration Information [Automatically generated, do not change]:
Machine: i586
OS: linux
Compiler: i586-uhu-linux-gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i586' 
-DCONF_OSTYPE='linux' -DCONF_MACHTYPE='i586-uhu-linux' -DCONF_VENDOR='uhu' 
-DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I.  
-I. -I./include -I./lib   -g -O2
uname output: Linux bobek 2.6.15-9 #1 SMP Fri Jan 20 15:43:25 CET 2006 i686 
UHU-Linux
Machine Type: i586-uhu-linux

Bash Version: 3.1
Patch Level: 5
Release Status: release

Description:
Hi,

I have a nice color prompt:
export PS1=$'\\[\017\E[10;0m\E[1;[EMAIL PROTECTED]:\\w\\$ \\[\E[0m\\]'
and use UTF-8 locales everywhere.

When the output of a command doesn't end with a newline, I could perfectly
see it in bash 3.0 since the prompt was printed on its right:

[EMAIL PROTECTED]:~$ echo -n foobar
[EMAIL PROTECTED]:~$ 

Is is also okay in bash 3.1 with 8-bit locales or with simple prompts.
However, if both colors are used in the prompt, and an UTF-8 locale is in
effect, the prompt overwrites the output:

[EMAIL PROTECTED]:~$ echo -n foobar
[EMAIL PROTECTED]:~$ ek:~$ 
^
the cursor stands here

(actually that leftover part of the prompt suggest that probably the prompt
is printed twice, first at the right place (after foobar) and then at the
end of the line).


-- 
Egmont


___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


Re: problem ? bug ?

2006-02-04 Thread Paul Jarc
[EMAIL PROTECTED] wrote:
> [kaneda<-ogorasek]~$if [ ! -a /etc/passwd ] ; then echo si ; fi

-a is used as a binary "and" operator here.  The expressions "!" and
"/etc/passwd" are nonempty strings, so both are considered true, and
the overall result is true.


paul


___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash