zsh-users
 help / color / mirror / code / Atom feed
* zsh not accepting commandline args at end of command
@ 2003-11-19 17:15 Eric Smith
  2003-11-19 17:23 ` Miek Gieben
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Eric Smith @ 2003-11-19 17:15 UTC (permalink / raw)
  To: zsh users

Hi

What might be causing this error in zsh.

eric@apple:~$ echo $SHELL
/bin/bash
eric@apple:~$ ls /tmp -F
ssh-XXUIWy1q/  v235390/
eric@apple:~$ zsh
[eric@apple ~]  $ ls -F /tmp
ssh-XXUIWy1q/  v235390/

... and here is the problem:
[eric@apple ~]  $ ls /tmp -F
ls: -F: No such file or directory
/tmp:
ssh-XXUIWy1q  v235390

thanks

-- 
Eric Smith


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

* Re: zsh not accepting commandline args at end of command
  2003-11-19 17:15 zsh not accepting commandline args at end of command Eric Smith
@ 2003-11-19 17:23 ` Miek Gieben
  2003-11-19 17:26 ` Clint Adams
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: Miek Gieben @ 2003-11-19 17:23 UTC (permalink / raw)
  To: Eric Smith; +Cc: zsh users

[On 19 Nov, @18:15, Eric wrote in "zsh not accepting commandline  ..."]
> Hi
> 
> What might be causing this error in zsh.
> 
> eric@apple:~$ echo $SHELL
> /bin/bash
> eric@apple:~$ ls /tmp -F
> ssh-XXUIWy1q/  v235390/
> eric@apple:~$ zsh
> [eric@apple ~]  $ ls -F /tmp
> ssh-XXUIWy1q/  v235390/
> 
> ... and here is the problem:
> [eric@apple ~]  $ ls /tmp -F
> ls: -F: No such file or directory
> /tmp:
> ssh-XXUIWy1q  v235390
> 
> thanks

I don't have that problem here:
% ls /tmp -F
0007300254/           iceauth.XXXXB8AEpM  ksocket-miekg/  texXL9vHn
....

running zsh 4.0.7

Maybe you have some sort of weird alias for ls?

grtz Miek


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

* Re: zsh not accepting commandline args at end of command
  2003-11-19 17:15 zsh not accepting commandline args at end of command Eric Smith
  2003-11-19 17:23 ` Miek Gieben
@ 2003-11-19 17:26 ` Clint Adams
  2003-11-19 17:26 ` Peter Stephenson
  2003-11-19 17:31 ` Bart Schaefer
  3 siblings, 0 replies; 11+ messages in thread
From: Clint Adams @ 2003-11-19 17:26 UTC (permalink / raw)
  To: Eric Smith; +Cc: zsh users

> What might be causing this error in zsh.
> 
> eric@apple:~$ echo $SHELL
> /bin/bash
> eric@apple:~$ ls /tmp -F
> ssh-XXUIWy1q/  v235390/
> eric@apple:~$ zsh
> [eric@apple ~]  $ ls -F /tmp
> ssh-XXUIWy1q/  v235390/
> 
> ... and here is the problem:
> [eric@apple ~]  $ ls /tmp -F
> ls: -F: No such file or directory
> /tmp:
> ssh-XXUIWy1q  v235390

Is your PATH different under zsh (thus causing you to use a different
ls)?  Is something setting the environment variable POSIXLY_CORRECT?
Do you have different aliases for ls?


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

* Re: zsh not accepting commandline args at end of command
  2003-11-19 17:15 zsh not accepting commandline args at end of command Eric Smith
  2003-11-19 17:23 ` Miek Gieben
  2003-11-19 17:26 ` Clint Adams
@ 2003-11-19 17:26 ` Peter Stephenson
  2003-11-19 17:32   ` Eric Smith
  2003-11-19 17:31 ` Bart Schaefer
  3 siblings, 1 reply; 11+ messages in thread
From: Peter Stephenson @ 2003-11-19 17:26 UTC (permalink / raw)
  To: zsh users

Eric Smith wrote:
> eric@apple:~$ ls /tmp -F
> ssh-XXUIWy1q/  v235390/

This is apparently the GNU ls behaviour.  (I think it's pretty yukky, but
never mind.)

> [eric@apple ~]  $ ls /tmp -F
> ls: -F: No such file or directory

This is standard with many other variants of ls.

Are the paths different in zsh and bash?

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


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


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

* Re: zsh not accepting commandline args at end of command
  2003-11-19 17:15 zsh not accepting commandline args at end of command Eric Smith
                   ` (2 preceding siblings ...)
  2003-11-19 17:26 ` Peter Stephenson
@ 2003-11-19 17:31 ` Bart Schaefer
  2003-11-19 17:42   ` Eric Smith
  3 siblings, 1 reply; 11+ messages in thread
From: Bart Schaefer @ 2003-11-19 17:31 UTC (permalink / raw)
  To: zsh users

On Nov 19,  6:15pm, Eric Smith wrote:
} 
} What might be causing this error in zsh.

I suspect you have an alias, or function wrapper, for 'ls'.  Works for me
with 'zsh -f'.


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

* Re: zsh not accepting commandline args at end of command
  2003-11-19 17:26 ` Peter Stephenson
@ 2003-11-19 17:32   ` Eric Smith
  2003-11-19 17:53     ` Aidan Kehoe
                       ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Eric Smith @ 2003-11-19 17:32 UTC (permalink / raw)
  To: zsh users

Thanks

But is weems to be using the same ls
[eric@apple ~]  $ which ls
/bin/ls
[eric@apple ~]  $ /bin/ls /tmp -F
/bin/ls: -F: No such file or directory
/tmp:
ssh-XXUIWy1q  v235390
[eric@apple ~]  $ exit

now in bash:
eric@apple:~$ /bin/ls /tmp -F
ssh-XXUIWy1q/  v235390/


Peter Stephenson said:
> Eric Smith wrote:
> > eric@apple:~$ ls /tmp -F
> > ssh-XXUIWy1q/  v235390/
> 
> This is apparently the GNU ls behaviour.  (I think it's pretty yukky, but
> never mind.)
> 
> > [eric@apple ~]  $ ls /tmp -F
> > ls: -F: No such file or directory
> 
> This is standard with many other variants of ls.
> 
> Are the paths different in zsh and bash?
> 
> -- 
> Peter Stephenson <pws@csr.com>                  Software Engineer
> CSR Ltd., Science Park, Milton Road,
> Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070
> 
> 
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
> 
> This footnote also confirms that this email message has been swept by
> MIMEsweeper for the presence of computer viruses.
> 
> www.mimesweeper.com
> **********************************************************************

-- 
Eric Smith


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

* Re: zsh not accepting commandline args at end of command
  2003-11-19 17:31 ` Bart Schaefer
@ 2003-11-19 17:42   ` Eric Smith
  0 siblings, 0 replies; 11+ messages in thread
From: Eric Smith @ 2003-11-19 17:42 UTC (permalink / raw)
  To: zsh users

Nope according to this:
[eric@apple ~]  $ which ls
/bin/ls
[eric@apple ~]  $ ls /tmp -f
ls: -f: No such file or directory
/tmp:
ssh-XXUIWy1q  v235390
[eric@apple ~]  $ exit

back to bash:
eric@apple:~$ which ls
/bin/ls
eric@apple:~$ ls /tmp -f
./  ../  .X11-unix/  .font-unix/  ssh-XXUIWy1q/  .X0-lock  v235390/

Some differences in strace FWIW:

zsh:
_sysctl({{CTL_KERN, KERN_VERSION}, 2, 0xbffff8cc, 30, (nil), 0}) = 0
brk(0)                                  = 0x805774c
brk(0x807874c)                          = 0x807874c
brk(0)                                  = 0x807874c
brk(0x8079000)                          = 0x8079000
ioctl(1, SNDCTL_TMR_TIMEBASE, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, 0x5413, {ws_row=48, ws_col=126, ws_xpixel=1022, ws_ypixel=766}) = 0
stat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0
stat64("-f", 0x8057898)                 = -1 ENOENT (No such file or directory)
lstat64("-f", 0x8057898)                = -1 ENOENT (No such file or directory)
write(2, "ls: ", 4ls: )                 = 4
write(2, "-f", 2-f)                     = 2

bash:
_sysctl({{CTL_KERN, KERN_VERSION}, 2, 0xbffff9ac, 30, (nil), 0}) = 0
brk(0)                                  = 0x805774c
brk(0x807874c)                          = 0x807874c
brk(0)                                  = 0x807874c
brk(0x8079000)                          = 0x8079000
ioctl(1, SNDCTL_TMR_TIMEBASE, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, 0x5413, {ws_row=48, ws_col=126, ws_xpixel=1022, ws_ypixel=766}) = 0
stat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0
open("/dev/null", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1 ENOTDIR (Not a directory)
open("/tmp", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3

Bart Schaefer said:
> On Nov 19,  6:15pm, Eric Smith wrote:
> } 
> } What might be causing this error in zsh.
> 
> I suspect you have an alias, or function wrapper, for 'ls'.  Works for me
> with 'zsh -f'.

-- 
Eric Smith


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

* Re: zsh not accepting commandline args at end of command
  2003-11-19 17:32   ` Eric Smith
@ 2003-11-19 17:53     ` Aidan Kehoe
  2003-11-19 18:42     ` Peter Stephenson
  2003-11-20  3:31     ` William H. Magill
  2 siblings, 0 replies; 11+ messages in thread
From: Aidan Kehoe @ 2003-11-19 17:53 UTC (permalink / raw)
  To: Eric Smith; +Cc: zsh users


 Ar an 19ú lá de mí 11, scríobh Eric Smith :

 > [eric@apple ~]  $ which ls
 > /bin/ls
 > [eric@apple ~]  $ /bin/ls /tmp -F
 > /bin/ls: -F: No such file or directory
 > /tmp:
 > ssh-XXUIWy1q  v235390
 > [eric@apple ~]  $ exit
 > 
 > now in bash:
 > eric@apple:~$ /bin/ls /tmp -F
 > ssh-XXUIWy1q/  v235390/

It's just about possible that Bash is using a global alias for ls. Aliases
don't show up in the output of "which" in Bash; if you want to see any
aliases for ls in Bash, try "alias" on its own. 

-- 
"... like, did you know, in Egypt, if a particularly beautiful girl, or the 
wife of a lord or whatever died, they wouldn't send her to the embalmer for 
three days? They'd let her spoil in the heat first."


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

* Re: zsh not accepting commandline args at end of command
  2003-11-19 17:32   ` Eric Smith
  2003-11-19 17:53     ` Aidan Kehoe
@ 2003-11-19 18:42     ` Peter Stephenson
  2003-11-20  3:31     ` William H. Magill
  2 siblings, 0 replies; 11+ messages in thread
From: Peter Stephenson @ 2003-11-19 18:42 UTC (permalink / raw)
  To: zsh users

Eric Smith wrote:
> Thanks
> 
> But is weems to be using the same ls
> [eric@apple ~]  $ which ls
> /bin/ls
> [eric@apple ~]  $ /bin/ls /tmp -F
> /bin/ls: -F: No such file or directory
> /tmp:
> ssh-XXUIWy1q  v235390
> [eric@apple ~]  $ exit
> 
> now in bash:
> eric@apple:~$ /bin/ls /tmp -F
> ssh-XXUIWy1q/  v235390/

In that case, you probably have POSIXLY_CORRECT set in the environment
for zsh.

% POSIXLY_CORRECT= =ls . -F
/home/pws/solaris8/bin/ls: -F: No such file or directory
.:
Master-16-14-bc2x.xcd  msg.html
% =ls . -F
Master-16-14-bc2x.xcd  msg.html

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


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


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

* Re: zsh not accepting commandline args at end of command
  2003-11-19 17:32   ` Eric Smith
  2003-11-19 17:53     ` Aidan Kehoe
  2003-11-19 18:42     ` Peter Stephenson
@ 2003-11-20  3:31     ` William H. Magill
  2003-11-20 17:13       ` Julien CROUZET
  2 siblings, 1 reply; 11+ messages in thread
From: William H. Magill @ 2003-11-20  3:31 UTC (permalink / raw)
  To: Eric Smith; +Cc: zsh users

On 19 Nov, 2003, at 12:32, Eric Smith wrote:
> But is weems to be using the same ls
> [eric@apple ~]  $ which ls
> /bin/ls
> [eric@apple ~]  $ /bin/ls /tmp -F
> /bin/ls: -F: No such file or directory
> /tmp:
> ssh-XXUIWy1q  v235390
> [eric@apple ~]  $ exit
>
> now in bash:
> eric@apple:~$ /bin/ls /tmp -F
> ssh-XXUIWy1q/  v235390/

The command results from bash are simply wierd.

Using
GNU bash, version 2.05b.0(1)-release (powerpc-apple-darwin7.0)

ls /tmp -F
generates exactly the same output as does  zsh or tcsh  (all without 
initialization files).
               ls: -F: No such file or directory

The command syntax is
                ls [-ABCFGHLPRTWZabcdfghiklmnopqrstuwx1] [file ...]

The parameters are positional, with the options first and the operands 
second.
The "-F" is treated as a file name, hence "no such file."

This is true for both the BSD and SystemV versions of ls.


T.T.F.N.
William H. Magill
# Beige G3 - Rev A motherboard - 768 Meg
# Flat-panel iMac (2.1) 800MHz - Super Drive - 768 Meg
# PWS433a [Alpha 21164 Rev 7.2 (EV56)- 64 Meg]- Tru64 5.1a
magill@mcgillsociety.org
magill@acm.org
magill@mac.com


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

* Re: zsh not accepting commandline args at end of command
  2003-11-20  3:31     ` William H. Magill
@ 2003-11-20 17:13       ` Julien CROUZET
  0 siblings, 0 replies; 11+ messages in thread
From: Julien CROUZET @ 2003-11-20 17:13 UTC (permalink / raw)
  To: zsh-users

> The command syntax is
>                 ls [-ABCFGHLPRTWZabcdfghiklmnopqrstuwx1] [file ...]
>
> The parameters are positional, with the options first and the operands
> second.
> The "-F" is treated as a file name, hence "no such file."
>
> This is true for both the BSD and SystemV versions of ls.
>

My thought : ls uses getopt(3)

Extract from man getopt(3) :
ENVIRONMENT VARIABLES
  POSIXLY_CORRECT
  If this is set, then option processing stops as soon as a non-option
argument is encountered.
--
Julien CROUZET



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

end of thread, other threads:[~2003-11-20 17:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-19 17:15 zsh not accepting commandline args at end of command Eric Smith
2003-11-19 17:23 ` Miek Gieben
2003-11-19 17:26 ` Clint Adams
2003-11-19 17:26 ` Peter Stephenson
2003-11-19 17:32   ` Eric Smith
2003-11-19 17:53     ` Aidan Kehoe
2003-11-19 18:42     ` Peter Stephenson
2003-11-20  3:31     ` William H. Magill
2003-11-20 17:13       ` Julien CROUZET
2003-11-19 17:31 ` Bart Schaefer
2003-11-19 17:42   ` Eric Smith

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).