Linux: bash 'declare -f' adds trailing whitespaces to output

2007-09-25 Thread Jari Aalto

Tested in:

GNU bash, version 2.05.0(1)-release (sparc-sun-solaris2.9)
GNU bash, version 3.2.25(16)-release (i686-pc-cygwin)

An example:

function testfunc ()
{
echo "this is test"
}

>From shell:

$ declare -f | grep testfunc -A 3 | cat -A

Result; notice the trailing whitespaces in output:

testfunc () $
{ $
echo "this is test"$
}$

Jari
-- 
Welcome to FOSS revolution: we fix and modify until it shines




Re: Linux: bash 'declare -f' adds trailing whitespaces to output

2007-09-25 Thread Jari Aalto
* Tue 2007-09-25 Chet Ramey  INBOX
> Jari Aalto wrote:
>
>> Tested in:
>> 
>> GNU bash, version 2.05.0(1)-release (sparc-sun-solaris2.9)
>> GNU bash, version 3.2.25(16)-release (i686-pc-cygwin)
>> 
>> An example:
>> 
>> function testfunc ()
>> {
>> echo "this is test"
>> }
>> 
>> From shell:
>> 
>> $ declare -f | grep testfunc -A 3 | cat -A
>> 
>> Result; notice the trailing whitespaces in output:
>
> It doesn't change the declaration or the semantics.  How is it a
> problem?

It smells like a bug to output trailing spaces for some lines and not
some others.(*)

Jari

(*) I sometimes "record" anvironment state and git does not like
trailing spaces for a good reason.

-- 
Welcome to FOSS revolution: we fix and modify until it shines




bash: bashref.info - Change index name from bash to bashref

2009-08-14 Thread Jari Aalto

-rw-rw-r--  1  502 root   5429 2009-03-16 18:36 bashref.info
-rw-rw-r--  1  502 root 301063 2009-03-16 18:36 bashref.info-1
-rw-rw-r--  1  502 root 128001 2009-03-16 18:36 bashref.info-2
-rw-r--r--  1 root src  117639 2009-03-16 18:40 bashref.info.tar.gz

$ install-info --debug bashref.info /usr/local/share/info/dir

$ emacs -Q -f info
m Bash 

ERROR is displayed and Bash info pages cannot be accessed:

Info-find-file: Info file bash does not exist

CORRECTION

The problems is incorrect entry in bashref.info. The following patch
fixes it.

Jari

>From 4df277d4306b8a1cdf4bc72761ab4d43aed51a84 Mon Sep 17 00:00:00 2001
From: Jari Aalto 
Date: Fri, 14 Aug 2009 21:16:54 +0300
Subject: [PATCH] bashref.info: Fix index name from 'bash' to 'bashrf'

Signed-off-by: Jari Aalto 
---
 bashref.info |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bashref.info b/bashref.info
index 312398b..a88de09 100644
--- a/bashref.info
+++ b/bashref.info
@@ -28,7 +28,7 @@ preserved on all copies.
 
 INFO-DIR-SECTION Basics
 START-INFO-DIR-ENTRY
-* Bash: (bash). The GNU Bourne-Again SHell.
+* Bash: (bashref). The GNU Bourne-Again SHell.
 END-INFO-DIR-ENTRY
 
 
-- 
1.6.3.3



Re: bash: bashref.info - Change index name from bash to bashref

2009-08-14 Thread Jari Aalto
Chet Ramey  writes:

> Jari Aalto wrote:
>> -rw-rw-r--  1  502 root   5429 2009-03-16 18:36 bashref.info
>> -rw-rw-r--  1  502 root 301063 2009-03-16 18:36 bashref.info-1
>> -rw-rw-r--  1  502 root 128001 2009-03-16 18:36 bashref.info-2
>> -rw-r--r--  1 root src  117639 2009-03-16 18:40 bashref.info.tar.gz
>> 
>> $ install-info --debug bashref.info /usr/local/share/info/dir
>
> Why did you do this, instead of `make install' in the doc subdirectory?
> The Makefile creates bash.info from bashref.info and installs it with
> the correct name and index.

According to:

http://www.gnu.org/software/bash/manual/

- Info document (120K bytes gzipped tar file).

Downloading and install_

wget http://www.gnu.org/software/bash/manual/bashref.info.tar.gz
tar -xf *.gz
ls -la
-rw-r--r--  1 foo foo   5429 2009-03-16 18:36 bashref.info
-rw-r--r--  1 foo foo 301063 2009-03-16 18:36 bashref.info-1
-rw-r--r--  1 foo foo 128001 2009-03-16 18:36 bashref.info-2
-rw-r--r--  1 foo foo 117639 2009-03-16 18:40 bashref.info.tar.gz

There is no Makefile; what would be the appropriate contact to fix this?

Jari