Re: job control command "%" no longer works

2005-09-22 Thread Chet Ramey
> So, apparently, sometime between bash-2.05a and bash-3.0, a change was made
> to the job control commands. It used to be the case that typing "%" on a
> line by itself would foreground the most recent job, just as if you had
> typed "fg" or "%+". In bash-3.0, this prints the error message:
> 
> bash: fg: %: no such job
> 
> I'm not exactly sure what this means. If I type "%v", it refers to the
> unique job whose command name starts with "v", so at a minimum it seems like
> "%" ought to refer to the unique job in existence (since the empty string is
> a prefix of every string) and produce an "ambiguous job spec" error if there
> is more than one - but it doesn't work that way.

The meaning of a null job spec was never defined.  An artifact of the
old implementation made it equivalent to the current job, but a code
cleanup during bash-3.0 development removed that function.  In bash-3.1,
it will explicitly mean the current job, and be documented as such.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
Live Strong.
Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://tiswww.tis.case.edu/~chet/


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


Re: [PATCH] fix bashdb script handling of tmp directory

2005-09-22 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

[forwarding to bashdb-devel]

According to [EMAIL PROTECTED] on 9/21/2005 11:53 AM:
> Configuration Information [Automatically generated, do not change]:
> Machine: i386
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' 
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu' 
> -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
> -DHAVE_CONFIG_H  -I.  -I../bash -I../bash/include -I../bash/lib   -g -O2
> uname output: Linux dungeon2 2.6.11-1-k7-smp #1 SMP Mon Jun 20 22:34:51 MDT 
> 2005 i686 GNU/Linux
> Machine Type: i386-pc-linux-gnu
> 
> Bash Version: 3.0
> Patch Level: 16
> Release Status: release
> 
> Description:
>   Using bashdb on scripts with directory components in their names
>   failes because it tried to create a temporary file in tmp
>   without stripping the directories and it failes becuase the
>   directories do not exist.
> 
> Fix:
>   Included is a patch that strips the directory names from 
>   $_guineapig before creating a temporary file.
> 
>   For good measure it also strips the dirs before outputing the
>   lines in the file.  It just makes it look better.

This patch is to bashdb, not bash.  Meanwhile, I just noticed that 'bashdb
- --help' and 'bashdb --version' are not accepted, and that neither 'bashdb
- -h' nor 'bashdb -V' output a bug-report address.

> 
> --- old-bashdb  2005-09-21 10:26:32.0 -0700
> +++ bashdb  2005-09-21 10:48:12.0 -0700
> @@ -509,11 +509,11 @@
>fi
> 
>if (( $line < 100 )); then
> -_msg "$_guineapig:$line   $bp $cl${_lines[$line]}"
> +_msg "${_guineapig/*\//}:$line   $bp $cl${_lines[$line]}"
>elif (( $line < 10 )); then
> -_msg "$_guineapig:$line  $bp $cl${_lines[$line]}"
> +_msg "${_guineapig/*\//}:$line  $bp $cl${_lines[$line]}"
>elif (( $line > 0 )); then
> -_msg "$_guineapig:$line $bp $cl${_lines[$line]}"
> +_msg "${_guineapig/*\//}:$line $bp $cl${_lines[$line]}"
>fi
>  }
> 
> @@ -564,7 +564,7 @@
>  let _i=1
> 
>  # Be careful about quoted newlines
> -_potbelliedpig=${TMPDIR-/tmp}/$_guineapig.$$
> +_potbelliedpig=${TMPDIR-/tmp}/${_guineapig/*\//}.$$
>  sed 's,\\$,,' $_guineapig > $_potbelliedpig
> 
> Thanks,
> Devin Bayer
> 
> 
> 
> ___
> Bug-bash mailing list
> Bug-bash@gnu.org
> http://lists.gnu.org/mailman/listinfo/bug-bash
> 

- --
Life is short - so eat dessert first!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDM0fy84KuGfSFAYARAthcAJ4kdxLnzgpveXaU1UJLsGpml+Tj4wCgpm4E
cRszTqsUUBzY5Q0FcstJ0SY=
=qIEM
-END PGP SIGNATURE-


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