zsh-workers
 help / color / mirror / code / Atom feed
* Hi.  Installed on FreeBSD 2.1
@ 1996-01-07  5:24 Michael Talbot-Wilson
  1996-01-07  5:31 ` d. hall
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michael Talbot-Wilson @ 1996-01-07  5:24 UTC (permalink / raw)
  To: Zsh Workers

... and very easily, too.  Ain't autoconf wonderful?

It is zsh-2.6-beta13.

I have a little problem with ls, though I guess it's more general.  Best 
explained by examples:

	$ ls -l -F			# okay
	$ A='-l'
	$ ls $A -F			# okay
	$ B='-l -F'
	$ ls $B				# error
					# BSD ls: "illegal option --"
					# GNU ls: "invalid option --"
	$ ls --8bit --color=tty -lF	# okay (GNU color ls)
	$ C='--8bit --color=tty'
	$ ls $C -lF		# unrecognized option `--8bit --color=tty'
				# (GNU color ls)

The problem does not appear with bash or tcsh.  It does appear with two 
varieties of ls with zsh.

The color ls works by assigning the variable LS_OPTIONS and using it in 
aliases.  It is set to "--8bit --color=<option>" by the program 
dircolors run in a shell startup file. 

-- Regards, Mike.


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

* Re: Hi.  Installed on FreeBSD 2.1
  1996-01-07  5:24 Hi. Installed on FreeBSD 2.1 Michael Talbot-Wilson
@ 1996-01-07  5:31 ` d. hall
  1996-01-07  5:32 ` Zefram
  1996-01-07  6:00 ` Michael Talbot-Wilson
  2 siblings, 0 replies; 4+ messages in thread
From: d. hall @ 1996-01-07  5:31 UTC (permalink / raw)
  To: Michael Talbot-Wilson; +Cc: Zsh Workers

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1555 bytes --]

ð thus on Sun, 7 Jan 1996 15:54:03 +1030 (CST), Michael virtually scripted...


> I have a little problem with ls, though I guess it's more general.  Best 
> explained by examples:

> 	$ ls -l -F			# okay
> 	$ A='-l'
> 	$ ls $A -F			# okay
> 	$ B='-l -F'
> 	$ ls $B				# error
> 					# BSD ls: "illegal option --"
> 					# GNU ls: "invalid option --"
> 	$ ls --8bit --color=tty -lF	# okay (GNU color ls)
> 	$ C='--8bit --color=tty'
> 	$ ls $C -lF		# unrecognized option `--8bit --color=tty'
> 				# (GNU color ls)

> The problem does not appear with bash or tcsh.  It does appear with two 
> varieties of ls with zsh.

> The color ls works by assigning the variable LS_OPTIONS and using it in 
> aliases.  It is set to "--8bit --color=<option>" by the program 
> dircolors run in a shell startup file. 

herein follows a color_ls setup (which i use on linux), notice the ()'s
since (and i do not if this is consistant with ksh, although for some
snipping reason i think this isn't how ksh does it).

### setup colorized directories
if [[ $TERM = "linux" ]] then
  LS_OPTIONS=(--8bit --color=yes -A -T 0)
  LS_PAGER=(less -rE '-P continue $')
else
  LS_OPTIONS=(--8bit --color=no -A -T 0)
  LS_PAGER=cat
fi

### system functions
function d() 	{ \ls $LS_OPTIONS -CF $* | $LS_PAGER }
function dir()	{ \ls $LS_OPTIONS -l  $* | $LS_PAGER }
function vls()	{ \ls $LS_OPTIONS -l  $* | less -r }
function pls()	{ \ls $LS_OPTIONS -lg $* | grep -v "^[d-]......---"}

d.
--
<<If you'd been there, you would've run from that deer, too!>>
				~jaya ballard, task mage


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

* Re: Hi.  Installed on FreeBSD 2.1
  1996-01-07  5:24 Hi. Installed on FreeBSD 2.1 Michael Talbot-Wilson
  1996-01-07  5:31 ` d. hall
@ 1996-01-07  5:32 ` Zefram
  1996-01-07  6:00 ` Michael Talbot-Wilson
  2 siblings, 0 replies; 4+ messages in thread
From: Zefram @ 1996-01-07  5:32 UTC (permalink / raw)
  To: Michael Talbot-Wilson; +Cc: zsh-workers

>	$ ls -l -F			# okay
>	$ A='-l'
>	$ ls $A -F			# okay
>	$ B='-l -F'
>	$ ls $B				# error
>					# BSD ls: "illegal option --"
>					# GNU ls: "invalid option --"

You obviously don't have the SH_WORD_SPLIT option set.  Normally,
Bourne shells will perform word splitting on the result of parameter
expansions, as you rely on here, but zsh doesn't do that by default.
Apart from turning on the option, there are two possible solutions:

B=(-l -F)
ls $B

B='-d -F'
ls $=B

-zefram


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

* Re: Hi. Installed on FreeBSD 2.1
  1996-01-07  5:24 Hi. Installed on FreeBSD 2.1 Michael Talbot-Wilson
  1996-01-07  5:31 ` d. hall
  1996-01-07  5:32 ` Zefram
@ 1996-01-07  6:00 ` Michael Talbot-Wilson
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Talbot-Wilson @ 1996-01-07  6:00 UTC (permalink / raw)
  To: Zsh Workers



Oops.  Found my dumb error.  Forgot the dircolors "-z" option, just for 
zsh.  Sorry to bother you.

Nice shell.  It just offered to correct my spelling of "zshenv" to 
".zshenv" (but I meant /etc/zshenv).

-- Regards, Mike


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

end of thread, other threads:[~1996-01-07  6:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-01-07  5:24 Hi. Installed on FreeBSD 2.1 Michael Talbot-Wilson
1996-01-07  5:31 ` d. hall
1996-01-07  5:32 ` Zefram
1996-01-07  6:00 ` Michael Talbot-Wilson

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