From: dhall@illusion.apk.net (d. hall)
To: Michael Talbot-Wilson <mike@calypso.bns.com.au>
Cc: Zsh Workers <zsh-workers@math.gatech.edu>
Subject: Re: Hi. Installed on FreeBSD 2.1
Date: 07 Jan 1996 00:31:12 -0500 [thread overview]
Message-ID: <x6iviovae7.fsf@illusion.apk.net> (raw)
In-Reply-To: Michael Talbot-Wilson's message of Sun, 7 Jan 1996 15:54:03 +1030 (CST)
[-- 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
next prev parent reply other threads:[~1996-01-07 5:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-01-07 5:24 Michael Talbot-Wilson
1996-01-07 5:31 ` d. hall [this message]
1996-01-07 5:32 ` Zefram
1996-01-07 6:00 ` Michael Talbot-Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=x6iviovae7.fsf@illusion.apk.net \
--to=dhall@illusion.apk.net \
--cc=mike@calypso.bns.com.au \
--cc=zsh-workers@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).