zsh-workers
 help / color / mirror / code / Atom feed
* [BUGREPORT] zsh-4.0.4 (i686-pc-linux-gnu)
@ 2002-06-26 21:38 monbil_f
  2002-06-28 10:52 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: monbil_f @ 2002-06-26 21:38 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 293 bytes --]

morpheus# chgrp adm kern.log
_path_files:340: unknown group
morpheus# chgrp adm kern.log

when i tab after kern.log and a space in order to choose another file to
chgrp.

my .zshrc:

autoload -U zutil
autoload -U compinit
autoload -U complist
compinit

if you need extra info you can email me

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUGREPORT] zsh-4.0.4 (i686-pc-linux-gnu)
  2002-06-26 21:38 [BUGREPORT] zsh-4.0.4 (i686-pc-linux-gnu) monbil_f
@ 2002-06-28 10:52 ` Peter Stephenson
  2002-07-02 14:06   ` Sven Wischnowsky
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 2002-06-28 10:52 UTC (permalink / raw)
  To: Zsh hackers list, monbil_f

monbil_f@epita.fr wrote:
> morpheus# chgrp adm kern.log
> _path_files:340: unknown group
> morpheus# chgrp adm kern.log
> 
> when i tab after kern.log and a space in order to choose another file to
> chgrp.

What's happening is that it's trying to complete files which aren't
already owned by the group `adm'.  So the file completion code in
_path_files uses a pattern for that purpose.  It then complains if the
group `adm' doesn't exist.  However, it should only do that if the group
adm *really* doesn't exist on your system.  Are you sure it does?  In
which case the problem is somewhere inside zsh, to do with its interface
with the system commands for reading groups.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUGREPORT] zsh-4.0.4 (i686-pc-linux-gnu)
  2002-06-28 10:52 ` Peter Stephenson
@ 2002-07-02 14:06   ` Sven Wischnowsky
  0 siblings, 0 replies; 3+ messages in thread
From: Sven Wischnowsky @ 2002-07-02 14:06 UTC (permalink / raw)
  To: zsh-workers


Peter Stephenson wrote:

> monbil_f@epita.fr wrote:
> > morpheus# chgrp adm kern.log
> > _path_files:340: unknown group
> > morpheus# chgrp adm kern.log
> > 
> > when i tab after kern.log and a space in order to choose another file to
> > chgrp.
> 
> What's happening is that it's trying to complete files which aren't
> already owned by the group `adm'.  So the file completion code in
> _path_files uses a pattern for that purpose.  It then complains if the
> group `adm' doesn't exist.  However, it should only do that if the group
> adm *really* doesn't exist on your system.  Are you sure it does?  In
> which case the problem is somewhere inside zsh, to do with its interface
> with the system commands for reading groups.

I can't see much the completion code can do besides trying to keep
globbing quiet (in _path_files) and checking if the group exists (in
_chown). That stuff in _chown could be improved, obviously.


Bye
  Sven

Index: Completion/Unix/Command/_chown
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_chown,v
retrieving revision 1.6
diff -u -r1.6 _chown
--- Completion/Unix/Command/_chown	22 Jan 2002 10:22:48 -0000	1.6
+++ Completion/Unix/Command/_chown	2 Jul 2002 14:03:53 -0000
@@ -1,6 +1,6 @@
 #compdef chown chgrp
 
-local suf usr grp req expl line
+local suf usr grp req line
 
 line=( "${(@)words[2,CURRENT-1]:#-*}" )
 
@@ -33,6 +33,9 @@
   req=( ${usr:+\^u$usr} ${grp:+\^g$grp} )
   (( EUID )) && req=( u$EUID$^req )
   req=( -$^req )
+  req="*(${(j:,:)req})"
 
-  _wanted files expl file _files -g "*(${(j:,:)req})" && return 0
+  ( : $~req ) 2> /dev/null || req='*'
+
+  _files -g "$req" && return 0
 fi
Index: Completion/Unix/Type/_path_files
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_path_files,v
retrieving revision 1.18
diff -u -r1.18 _path_files
--- Completion/Unix/Type/_path_files	29 May 2002 15:05:24 -0000	1.18
+++ Completion/Unix/Type/_path_files	2 Jul 2002 14:03:53 -0000
@@ -338,7 +338,7 @@
     else
       compfiles -p$cfopt tmp1 accex "$skipped" "$_matcher $matcher[2]" '' fake "$pats[@]"
     fi
-    tmp1=( $~tmp1 )
+    tmp1=( $~tmp1 ) 2> /dev/null
 
     if [[ -n "$PREFIX$SUFFIX" ]]; then
       # See which of them match what's on the line.

-- 
Sven Wischnowsky                          wischnow@berkom.de


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-07-02 14:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-26 21:38 [BUGREPORT] zsh-4.0.4 (i686-pc-linux-gnu) monbil_f
2002-06-28 10:52 ` Peter Stephenson
2002-07-02 14:06   ` Sven Wischnowsky

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).