Re: foo* doesn't match when 'foobar' does; fname=FooBar on xfs w/naming "ci" option

2010-05-22 Thread Linda Walsh



Marc Herbert wrote:

You could try to implement (case-insensitive) *globbing* in xfs. Quite
a challenge I guess!

---
File systems ignoring case is not uncommon.
File systems doing globbing?  That's not something any file system
does, that I know of.  It's done by software usually above the OS 
level these days.






How only show time of files with ls?

2010-05-22 Thread Peng Yu
ls -go gives me permission and file sizes. But I only want to show
time and file names. Would you please let me know what command to use?

-- 
Regards,
Peng



How not to expand a environment variable when doing command completion?

2010-05-22 Thread Peng Yu
When I type 'cd $HOME/.', bash will expand the command to 'cd
/home/my_user_name/.'. Would you please let me know how to let bash
expand the environment variable?

-- 
Regards,
Peng



Re: How only show time of files with ls?

2010-05-22 Thread Bob Proulx
Peng Yu wrote:
> ls -go gives me permission and file sizes. But I only want to show
> time and file names. Would you please let me know what command to use?

Since this has nothing to do with bash it is off topic for the
bug-bash list.  In the future think about sending general help
questions to the help-gnu-ut...@gnu.org mailing list instead.  Or if
you are specific about 'ls' then the coreut...@gnu.org mailing list of
which 'ls' is a component.

You might consider using 'stat' for this.

  stat --printf "%y %n\n" *

Or 'find'.

  find . -maxdepth 1 -printf "%TF %TT %p\n"

Or some combination of the two.

Bob



Conflicts between "complete" and "complete-filename"

2010-05-22 Thread Henning Bekel
Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -
DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -
DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -
DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib   -march=i686 -
mtune=generic -O2 -pipe
uname output: Linux box 2.6.33-ARCH #1 SMP PREEMPT Thu May 13 12:06:25 
CEST 2010 i686 AMD Athlon(tm) XP 2200+ AuthenticAMD GNU/Linux
Machine Type: i686-pc-linux-gnu

Bash Version: 4.1
Patch Level: 7
Release Status: release

Description: 
When the first word of the command line is a path containing
slashes and ending in a slash or a partial filename of a
non-executable file, if completion is attempted first via the
readline function "complete" and after that with
"complete-filename", then completion fails and
"complete-filename" behaves similar to "complete" in that it
only matches executable files and directories.

Repeat-By:
$ mkdir foo
$ touch foo/bar
$ bind '"\ew": complete-filename'

$ foo   # completes to foo/
$ foo/ # no matches, as expected, but then
$ foo/<\ew> # no matches either, should complete to foo/bar

likewise:
$ foo# completes to foo/, I type 'b' and then do
$ foo/b # no matches, as expected, but then
$ foo/b<\ew> # no matches either, should complete to foo/bar

whereas:
$ fo# completes to foo/
$ foo/<\ew>  # completes to foo/bar, just like  
$ foo/b<\ew> # completes to foo/bar, too

To get out of "being stuck with regular complete":

$ foo/b # "I'm stuck", so I  back to "foo"
$ foo   # completes to foo/
$ foo/<\ew>  # again completes to foo/bar alright

The reason I want to complete to non-executable files is that
I have a prompt command that reacts to "permission denied" and
passes the path entered to xdg-open, so I can "open" files
from the bash in an external application.

Alternatively, is there a way to just have regular "complete"
match non-executable filenames as well? As far as I understand
it from the manual, there isn't... am I mistaken?




Bash-4.1 Official Patch 3

2010-05-22 Thread Chet Ramey
 BASH PATCH REPORT
 =

Bash-Release:   4.1
Patch-ID:   bash41-003

Bug-Reported-by:coy...@wariat.org.pl
Bug-Reference-ID:   <4b64a1f8.06e2660a.60af.4...@mx.google.com>
Bug-Reference-URL:  
http://lists.gnu.org/archive/html/bug-bash/2010-01/msg00135.html

Bug-Description:

If command completion is attempted on a word with a quoted globbing
character (e.g., `*' or `?'), bash can reference a NULL pointer and
dump core.

Patch (apply with `patch -p0'):

*** ../bash-4.1-patched/bashline.c  2009-10-24 14:10:19.0 -0400
--- bashline.c  2010-01-30 21:53:49.0 -0500
***
*** 1681,1685 
   characters in the common prefix are bad) will ever be returned on
   regular completion. */
!   if (glob_pattern_p (hint))
  {
if (state == 0)
--- 1681,1685 
   characters in the common prefix are bad) will ever be returned on
   regular completion. */
!   if (globpat)
  {
if (state == 0)
*** ../bash-4.1-patched/patchlevel.h2009-10-01 16:39:22.0 -0400
--- patchlevel.h2010-01-14 09:38:08.0 -0500
***
*** 26,30 
 looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 2
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 
 looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 3
  
  #endif /* _PATCHLEVEL_H_ */

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/



Bash-4.1 Official Patch 4

2010-05-22 Thread Chet Ramey
 BASH PATCH REPORT
 =

Bash-Release:   4.1
Patch-ID:   bash41-004

Bug-Reported-by:Crestez Dan Leonard 
Bug-Reference-ID:   <1265592839.30682.21.ca...@deskbox>
Bug-Reference-URL:  
http://lists.gnu.org/archive/html/bug-bash/2010-02/msg00034.html

Bug-Description:

When running in Posix mode and executing a shell function without local
variables, bash will not propagate a variable in a special builtin's temporary
environment to have global scope.

Patch (apply with `patch -p0'):

*** ../bash-4.1-patched/variables.c 2009-11-03 14:13:58.0 -0500
--- variables.c 2010-02-08 17:36:18.0 -0500
***
*** 3809,3812 
--- 3809,3817 
if (tempvar_p (var) && (posixly_correct || (var->attributes & 
att_propagate)))
  {
+   /* Make sure we have a hash table to store the variable in while it is
+being propagated down to the global variables table.  Create one if
+we have to */
+   if ((vc_isfuncenv (shell_variables) || vc_istempenv (shell_variables)) 
&& shell_variables->table == 0)
+   shell_variables->table = hash_create (0);
/* XXX - should we set v->context here? */
v = bind_variable_internal (var->name, value_cell (var), 
shell_variables->table, 0, 0);
*** ../bash-4.1-patched/patchlevel.h2009-10-01 16:39:22.0 -0400
--- patchlevel.h2010-01-14 09:38:08.0 -0500
***
*** 26,30 
 looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 3
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 
 looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 4
  
  #endif /* _PATCHLEVEL_H_ */

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/



Bash-4.1 Official Patch 5

2010-05-22 Thread Chet Ramey
 BASH PATCH REPORT
 =

Bash-Release:   4.1
Patch-ID:   bash41-005

Bug-Reported-by:wer...@suse.de
Bug-Reference-ID:   <201002251238.o1pccycg016...@boole.suse.de>
Bug-Reference-URL:  
http://lists.gnu.org/archive/html/bug-bash/2010-02/msg00132.html

Bug-Description:

When the `read' builtin times out after the timeout specified with -t is
exceeded, it does not reset the flags that tell signal handlers to process
signals immediately instead of deferring their handling.  This can result
in unsafe functions being called from signal handlers, which can cause bash
to hang or dump core.

Patch (apply with `patch -p0'):

*** ../bash-4.1-patched/builtins/read.def   2009-10-08 11:35:46.0 
-0400
--- builtins/read.def   2010-03-17 17:35:39.0 -0400
***
*** 616,621 
  zsyncfd (fd);
  
-   interrupt_immediately--;
-   terminate_immediately--;
discard_unwind_frame ("read_builtin");
  
--- 616,619 
***
*** 624,627 
--- 622,628 
  assign_vars:
  
+   interrupt_immediately--;
+   terminate_immediately--;
+ 
  #if defined (ARRAY_VARS)
/* If -a was given, take the string read, break it into a list of words,
*** ../bash-4.1-patched/patchlevel.h2009-10-01 16:39:22.0 -0400
--- patchlevel.h2010-01-14 09:38:08.0 -0500
***
*** 26,30 
 looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 4
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 
 looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 5
  
  #endif /* _PATCHLEVEL_H_ */

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/



Bash-4.1 Official Patch 6

2010-05-22 Thread Chet Ramey
 BASH PATCH REPORT
 =

Bash-Release:   4.1
Patch-ID:   bash41-006

Bug-Reported-by:Mike Frysinger 
Bug-Reference-ID:   <201003210155.56618.vap...@gentoo.org>
Bug-Reference-URL:  
http://lists.gnu.org/archive/html/bug-bash/2010-03/msg00063.html

Bug-Description:

Bash did not correctly print/reproduce here documents attached to commands
inside compound commands such as for and while.  This affected the
execution of such commands inside a shell function when the function
definition is saved and later restored using `.' or `eval'.

Patch (apply with `patch -p0'):

*** ../bash-4.1-patched/print_cmd.c 2009-09-16 15:32:26.0 -0400
--- print_cmd.c 2010-03-22 21:15:30.0 -0400
***
*** 114,117 
--- 114,123 
  #define CHECK_XTRACE_FP   xtrace_fp = (xtrace_fp ? xtrace_fp : stderr)
  
+ #define PRINT_DEFERRED_HEREDOCS(x) \
+   do { \
+ if (deferred_heredocs) \
+   print_deferred_heredocs (x); \
+   } while (0)
+ 
  /* Non-zero means the stuff being printed is inside of a function def. */
  static int inside_function_def;
***
*** 561,571 
  {
print_for_command_head (for_command);
- 
cprintf (";");
newline ("do\n");
indentation += indentation_amount;
make_command_string_internal (for_command->action);
semicolon ();
indentation -= indentation_amount;
newline ("done");
  }
--- 566,578 
  {
print_for_command_head (for_command);
cprintf (";");
newline ("do\n");
+ 
indentation += indentation_amount;
make_command_string_internal (for_command->action);
+   PRINT_DEFERRED_HEREDOCS ("");
semicolon ();
indentation -= indentation_amount;
+ 
newline ("done");
  }
*** ../bash-4.1-patched/patchlevel.h2009-10-01 16:39:22.0 -0400
--- patchlevel.h2010-01-14 09:38:08.0 -0500
***
*** 26,30 
 looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 5
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 
 looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 6
  
  #endif /* _PATCHLEVEL_H_ */

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/



Bash-4.1 Official Patch 7

2010-05-22 Thread Chet Ramey
 BASH PATCH REPORT
 =

Bash-Release:   4.1
Patch-ID:   bash41-007

Bug-Reported-by:Rob Robason 
Bug-Reference-ID:   <1269513145.22336.9.ca...@home.robason.homelinux.net>
Bug-Reference-URL:  
http://lists.gnu.org/archive/html/bug-bash/2010-03/msg00089.html

Bug-Description:

A typo caused bash to not honor a precision specification in a printf
format.

Patch (apply with `patch -p0'):

*** ../bash-4.1-patched/builtins/printf.def 2010-01-18 10:50:22.0 
-0500
--- builtins/printf.def 2010-03-25 09:40:56.0 -0400
***
*** 118,122 
nw = vflag ? vbprintf (f, fieldwidth, func) : printf (f, fieldwidth, 
func); \
  else if (have_precision) \
!   nw = vflag ? vbprintf (f, precision, func) : printf (f, fieldwidth, 
func); \
  else \
nw = vflag ? vbprintf (f, func) : printf (f, func); \
--- 118,122 
nw = vflag ? vbprintf (f, fieldwidth, func) : printf (f, fieldwidth, 
func); \
  else if (have_precision) \
!   nw = vflag ? vbprintf (f, precision, func) : printf (f, precision, 
func); \
  else \
nw = vflag ? vbprintf (f, func) : printf (f, func); \
*** ../bash-4.1-patched/patchlevel.h2009-10-01 16:39:22.0 -0400
--- patchlevel.h2010-01-14 09:38:08.0 -0500
***
*** 26,30 
 looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 6
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 
 looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 7
  
  #endif /* _PATCHLEVEL_H_ */

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/



Re: Possibly missing announce of bash41-006 and 007 patches

2010-05-22 Thread Chet Ramey
On 5/21/10 1:56 PM, Joachim Schmitz wrote:

> I've never seen pathces 3, 4 and 5 having been announced either. Is that
> just me?

I'm convinced I sent them out, but I will resend them when I send
patches 6 and 7.

Chet


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/