zsh-users
 help / color / mirror / code / Atom feed
From: Peter Whaite <peta@cim.mcgill.ca>
To: zsh-users@math.gatech.edu
Subject: Re: ANSI zsh? (GNU 3.13 ls ORPHAN color patch)
Date: Fri, 22 Nov 1996 13:41:26 -0500	[thread overview]
Message-ID: <199611221841.NAA24951@Pontryagin.McRCIM.McGill.EDU> (raw)
In-Reply-To: Your message of "22 Nov 1996 07:55:53 +0200." <k8kn2wa65cm.fsf@paperilennokki.cs.hut.fi>


Aki Vehtari said:
> 
> The GNU ls is part of the GNU fileutils and "--color=tty" option was
> added to GNU ls in fileutils-3.13 (which is the latest version AFAIK)

Sorry to continue this off-topic thread but I found that the GNU version
(3.13) of color-ls does not support the, very useful, ORPHAN color for
dangling symbolic links.  I have a patch which works on our irix and sun
systems (below) but I'm wondering if there is a better one around.

--- ls.c.~1~	Mon Jul  8 00:23:47 1996
+++ ls.c	Fri Sep 20 11:43:26 1996
@@ -1593,6 +1593,7 @@
 
   files[files_index].linkname = 0;
   files[files_index].linkmode = 0;
+  files[files_index].linkok = 1;
 
   if (explicit_arg || format_needs_stat)
     {
@@ -1638,7 +1639,8 @@
 	  if (linkpath
 	      && ((explicit_arg && format != long_format)
 		  || indicator_style != none)
-	      && stat (linkpath, &linkstats) == 0)
+	      && (files[files_index].linkok =
+		  (stat (linkpath, &linkstats) == 0) ) )
 	    {
 	      /* Symbolic links to directories that are mentioned on the
 	         command line are automatically traced if not being




  reply	other threads:[~1996-11-22 19:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-21 23:25 ANSI zsh? Matthew Braun
1996-11-22  5:55 ` Aki Vehtari
1996-11-22 18:41   ` Peter Whaite [this message]
1997-01-14  7:58     ` ANSI zsh? (GNU 3.13 ls ORPHAN color patch) John Harres

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=199611221841.NAA24951@Pontryagin.McRCIM.McGill.EDU \
    --to=peta@cim.mcgill.ca \
    --cc=zsh-users@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).