Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Hi. Installed on FreeBSD 2.1



ð 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



Messages sorted by: Reverse Date, Date, Thread, Author