head 1.8; access; symbols pkgsrc-2026Q1:1.8.0.86 pkgsrc-2026Q1-base:1.8 pkgsrc-2025Q4:1.8.0.84 pkgsrc-2025Q4-base:1.8 pkgsrc-2025Q3:1.8.0.82 pkgsrc-2025Q3-base:1.8 pkgsrc-2025Q2:1.8.0.80 pkgsrc-2025Q2-base:1.8 pkgsrc-2025Q1:1.8.0.78 pkgsrc-2025Q1-base:1.8 pkgsrc-2024Q4:1.8.0.76 pkgsrc-2024Q4-base:1.8 pkgsrc-2024Q3:1.8.0.74 pkgsrc-2024Q3-base:1.8 pkgsrc-2024Q2:1.8.0.72 pkgsrc-2024Q2-base:1.8 pkgsrc-2024Q1:1.8.0.70 pkgsrc-2024Q1-base:1.8 pkgsrc-2023Q4:1.8.0.68 pkgsrc-2023Q4-base:1.8 pkgsrc-2023Q3:1.8.0.66 pkgsrc-2023Q3-base:1.8 pkgsrc-2023Q2:1.8.0.64 pkgsrc-2023Q2-base:1.8 pkgsrc-2023Q1:1.8.0.62 pkgsrc-2023Q1-base:1.8 pkgsrc-2022Q4:1.8.0.60 pkgsrc-2022Q4-base:1.8 pkgsrc-2022Q3:1.8.0.58 pkgsrc-2022Q3-base:1.8 pkgsrc-2022Q2:1.8.0.56 pkgsrc-2022Q2-base:1.8 pkgsrc-2022Q1:1.8.0.54 pkgsrc-2022Q1-base:1.8 pkgsrc-2021Q4:1.8.0.52 pkgsrc-2021Q4-base:1.8 pkgsrc-2021Q3:1.8.0.50 pkgsrc-2021Q3-base:1.8 pkgsrc-2021Q2:1.8.0.48 pkgsrc-2021Q2-base:1.8 pkgsrc-2021Q1:1.8.0.46 pkgsrc-2021Q1-base:1.8 pkgsrc-2020Q4:1.8.0.44 pkgsrc-2020Q4-base:1.8 pkgsrc-2020Q3:1.8.0.42 pkgsrc-2020Q3-base:1.8 pkgsrc-2020Q2:1.8.0.38 pkgsrc-2020Q2-base:1.8 pkgsrc-2020Q1:1.8.0.18 pkgsrc-2020Q1-base:1.8 pkgsrc-2019Q4:1.8.0.40 pkgsrc-2019Q4-base:1.8 pkgsrc-2019Q3:1.8.0.36 pkgsrc-2019Q3-base:1.8 pkgsrc-2019Q2:1.8.0.34 pkgsrc-2019Q2-base:1.8 pkgsrc-2019Q1:1.8.0.32 pkgsrc-2019Q1-base:1.8 pkgsrc-2018Q4:1.8.0.30 pkgsrc-2018Q4-base:1.8 pkgsrc-2018Q3:1.8.0.28 pkgsrc-2018Q3-base:1.8 pkgsrc-2018Q2:1.8.0.26 pkgsrc-2018Q2-base:1.8 pkgsrc-2018Q1:1.8.0.24 pkgsrc-2018Q1-base:1.8 pkgsrc-2017Q4:1.8.0.22 pkgsrc-2017Q4-base:1.8 pkgsrc-2017Q3:1.8.0.20 pkgsrc-2017Q3-base:1.8 pkgsrc-2017Q2:1.8.0.16 pkgsrc-2017Q2-base:1.8 pkgsrc-2017Q1:1.8.0.14 pkgsrc-2017Q1-base:1.8 pkgsrc-2016Q4:1.8.0.12 pkgsrc-2016Q4-base:1.8 pkgsrc-2016Q3:1.8.0.10 pkgsrc-2016Q3-base:1.8 pkgsrc-2016Q2:1.8.0.8 pkgsrc-2016Q2-base:1.8 pkgsrc-2016Q1:1.8.0.6 pkgsrc-2016Q1-base:1.8 pkgsrc-2015Q4:1.8.0.4 pkgsrc-2015Q4-base:1.8 pkgsrc-2015Q3:1.8.0.2 pkgsrc-2015Q3-base:1.8 pkgsrc-2015Q2:1.7.0.90 pkgsrc-2015Q2-base:1.7 pkgsrc-2015Q1:1.7.0.88 pkgsrc-2015Q1-base:1.7 pkgsrc-2014Q4:1.7.0.86 pkgsrc-2014Q4-base:1.7 pkgsrc-2014Q3:1.7.0.84 pkgsrc-2014Q3-base:1.7 pkgsrc-2014Q2:1.7.0.82 pkgsrc-2014Q2-base:1.7 pkgsrc-2014Q1:1.7.0.80 pkgsrc-2014Q1-base:1.7 pkgsrc-2013Q4:1.7.0.78 pkgsrc-2013Q4-base:1.7 pkgsrc-2013Q3:1.7.0.76 pkgsrc-2013Q3-base:1.7 pkgsrc-2013Q2:1.7.0.74 pkgsrc-2013Q2-base:1.7 pkgsrc-2013Q1:1.7.0.72 pkgsrc-2013Q1-base:1.7 pkgsrc-2012Q4:1.7.0.70 pkgsrc-2012Q4-base:1.7 pkgsrc-2012Q3:1.7.0.68 pkgsrc-2012Q3-base:1.7 pkgsrc-2012Q2:1.7.0.66 pkgsrc-2012Q2-base:1.7 pkgsrc-2012Q1:1.7.0.64 pkgsrc-2012Q1-base:1.7 pkgsrc-2011Q4:1.7.0.62 pkgsrc-2011Q4-base:1.7 pkgsrc-2011Q3:1.7.0.60 pkgsrc-2011Q3-base:1.7 pkgsrc-2011Q2:1.7.0.58 pkgsrc-2011Q2-base:1.7 pkgsrc-2011Q1:1.7.0.56 pkgsrc-2011Q1-base:1.7 pkgsrc-2010Q4:1.7.0.54 pkgsrc-2010Q4-base:1.7 pkgsrc-2010Q3:1.7.0.52 pkgsrc-2010Q3-base:1.7 pkgsrc-2010Q2:1.7.0.50 pkgsrc-2010Q2-base:1.7 pkgsrc-2010Q1:1.7.0.48 pkgsrc-2010Q1-base:1.7 pkgsrc-2009Q4:1.7.0.46 pkgsrc-2009Q4-base:1.7 pkgsrc-2009Q3:1.7.0.44 pkgsrc-2009Q3-base:1.7 pkgsrc-2009Q2:1.7.0.42 pkgsrc-2009Q2-base:1.7 pkgsrc-2009Q1:1.7.0.40 pkgsrc-2009Q1-base:1.7 pkgsrc-2008Q4:1.7.0.38 pkgsrc-2008Q4-base:1.7 pkgsrc-2008Q3:1.7.0.36 pkgsrc-2008Q3-base:1.7 cube-native-xorg:1.7.0.34 cube-native-xorg-base:1.7 pkgsrc-2008Q2:1.7.0.32 pkgsrc-2008Q2-base:1.7 cwrapper:1.7.0.30 pkgsrc-2008Q1:1.7.0.28 pkgsrc-2008Q1-base:1.7 pkgsrc-2007Q4:1.7.0.26 pkgsrc-2007Q4-base:1.7 pkgsrc-2007Q3:1.7.0.24 pkgsrc-2007Q3-base:1.7 pkgsrc-2007Q2:1.7.0.22 pkgsrc-2007Q2-base:1.7 pkgsrc-2007Q1:1.7.0.20 pkgsrc-2007Q1-base:1.7 pkgsrc-2006Q4:1.7.0.18 pkgsrc-2006Q4-base:1.7 pkgsrc-2006Q3:1.7.0.16 pkgsrc-2006Q3-base:1.7 pkgsrc-2006Q2:1.7.0.14 pkgsrc-2006Q2-base:1.7 pkgsrc-2006Q1:1.7.0.12 pkgsrc-2006Q1-base:1.7 pkgsrc-2005Q4:1.7.0.10 pkgsrc-2005Q4-base:1.7 pkgsrc-2005Q3:1.7.0.8 pkgsrc-2005Q3-base:1.7 pkgsrc-2005Q2:1.7.0.6 pkgsrc-2005Q2-base:1.7 pkgsrc-2005Q1:1.7.0.4 pkgsrc-2005Q1-base:1.7 pkgsrc-2004Q4:1.7.0.2 pkgsrc-2004Q4-base:1.7 pkgsrc-2004Q3:1.6.0.16 pkgsrc-2004Q3-base:1.6 pkgsrc-2004Q2:1.6.0.14 pkgsrc-2004Q2-base:1.6 pkgsrc-2004Q1:1.6.0.12 pkgsrc-2004Q1-base:1.6 pkgsrc-2003Q4:1.6.0.10 pkgsrc-2003Q4-base:1.6 netbsd-1-6-1:1.6.0.6 netbsd-1-6-1-base:1.6 netbsd-1-6:1.6.0.8 netbsd-1-6-RELEASE-base:1.6 pkgviews:1.6.0.4 pkgviews-base:1.6 buildlink2:1.6.0.2 buildlink2-base:1.6 netbsd-1-5-PATCH003:1.6 netbsd-1-5-PATCH001:1.6 netbsd-1-5-RELEASE:1.6 netbsd-1-4-PATCH003:1.6 netbsd-1-4-PATCH002:1.6 comdex-fall-1999:1.4 netbsd-1-4-PATCH001:1.4 netbsd-1-4-RELEASE:1.4 netbsd-1-3-PATCH003:1.4 netbsd-1-3-PATCH002:1.2; locks; strict; comment @# @; 1.8 date 2015.07.09.11.44.09; author jperkin; state Exp; branches; next 1.7; commitid 8PWUs1MPC6CvvBsy; 1.7 date 2004.10.13.18.50.13; author tv; state Exp; branches; next 1.6; 1.6 date 2000.02.05.20.05.24; author wiz; state Exp; branches; next 1.5; 1.5 date 99.11.27.22.55.07; author rh; state Exp; branches; next 1.4; 1.4 date 98.08.07.11.10.12; author agc; state Exp; branches; next 1.3; 1.3 date 98.05.21.14.06.37; author frueauf; state Exp; branches; next 1.2; 1.2 date 98.05.04.23.30.22; author hubertf; state Exp; branches; next 1.1; 1.1 date 97.10.24.01.01.57; author hubertf; state Exp; branches; next ; desc @@ 1.8 log @Use nbcompat correctly, add patch comments. Fixes build on SunOS. @ text @$NetBSD: patch-ab,v 1.7 2004/10/13 18:50:13 tv Exp $ Manual page fixes. --- colorls.1.orig 2015-07-09 11:19:52.025462425 +0000 +++ colorls.1 @@@@ -37,14 +37,22 @@@@ .\" .Dd July 29, 1994 -.Dt LS 1 +.Dt COLORLS 1 .Os .Sh NAME -.Nm ls -.Nd list directory contents +.Nm colorls +.Nd list directory contents in color .Sh SYNOPSIS -.Nm ls -.Op Fl ACFLRTWacdfiloqrstu1 +.Nm colorls +.Op Fl ACFGLRTWacdfiloqrstu1 .Op Ar file ... .Sh DESCRIPTION +(Note: This man page describes the color version of the program. To +minimize the differences from the original, the program is referred to +as +.Nm ls +in this manual. The new option +.Fl G +is for color display.) +.Pp For each operand that names a .Ar file @@@@ -88,4 +96,10 @@@@ a percent sign (%) after each whiteout, and a vertical bar (|) after each that is a .Tn FIFO . +.It Fl G +Use ANSI color sequences to distinguish file types. (See +.Ev LSCOLORS +below.) In addition to those mentioned above in +.Fl F , +some extra attributes (setuid bit set, etc.) are also displayed. .It Fl L If argument is a symbolic link, list the file or directory the link references @@@@ -319,4 +333,72 @@@@ See .Xr environ 7 for more information. +.It LSCOLORS +The value of this variable describes what color to use for which +attribute when the color output +.Pq Fl G +is specified. This string is a concatenation of pairs of the format +.Sy fb , +where +.Sy f +is the foreground color and +.Sy b +is the background color. +.Pp +The color designators are as follows: +.Pp +.Bl -tag -width 4n -offset indent -compact +.It Sy 0 +black +.It Sy 1 +red +.It Sy 2 +green +.It Sy 3 +yellow +.It Sy 4 +blue +.It Sy 5 +magenta +.It Sy 6 +cyan +.It Sy 7 +white +.It Sy x +default foreground or background +.El +.Pp +(Note: the above are standard ANSI colors. The actual display may +differ depending on the color capabilities of your terminal.) +.Pp +The order of the attributes are as follows: +.Pp +.Bl -enum -offset indent -compact +.It +directory +.It +symbolic link +.It +socket +.It +pipe +.It +executable +.It +block special +.It +character special +.It +executable with setuid bit set +.It +executable with setgid bit set +.It +directory writable to others, with sticky bit +.It +directory writable to others, without sticky bit +.El +.Pp +The default is "4x5x2x3x1x464301060203", i.e., blue foreground and +default background for regular directories, black foreground and red +background for setuid executables, etc. .El .Sh COMPATIBILITY @ 1.7 log @Defuzz patches by regenerating with pkgdiff. @ text @d1 1 a1 1 $NetBSD$ d3 3 a5 1 --- colorls.1.orig Wed Oct 13 14:49:05 2004 @ 1.6 log @defuzzed @ text @d3 3 a5 3 --- colorls.1.orig Sat Nov 27 23:53:51 1999 +++ colorls.1 Sat Nov 27 23:53:52 1999 @@@@ -35,15 +35,23 @@@@ d33 1 a33 3 of a type other than @@@@ -87,6 +95,12 @@@@ a percent sign (%) after each whiteout, d44 1 a44 3 rather than the link itself. @@@@ -318,6 +332,74 @@@@ See a116 1 The group field is now automatically included in the long listing for @ 1.5 log @defuzz @ text @d5 1 a5 2 @@@@ -36,16 +36,24 @@@@ .\" $Id: ls.1,v 1.6 1996/12/14 06:03:27 steve Exp $ @ 1.4 log @Add NetBSD RCS Ids. @ text @d3 2 a4 2 --- colorls.1.orig Thu May 21 15:42:07 1998 +++ colorls.1 Thu May 21 15:42:09 1998 d6 1 a6 1 .\" Id: patch-ab,v 1.3 1998/05/21 14:06:37 frueauf Exp @ 1.3 log @Handle MANZ case better and split the big patch file into one patch per file for better maintainance. @ text @d1 2 d6 1 a6 1 .\" $Id: ls.1,v 1.6 1996/12/14 06:03:27 steve Exp $ @ 1.2 log @Fix output if it's not going to a tty; as posted to current-users by Soren S. Jorvang . @ text @d1 120 a120 21 --- ls.c.orig Tue May 5 01:15:09 1998 +++ ls.c Tue May 5 01:16:24 1998 @@@@ -59,6 +59,8 @@@@ #include #include #include +#include +#include #include "ls.h" #include "extern.h" @@@@ -170,7 +172,8 @@@@ f_type = 1; break; case 'G': - f_color = 1; + if (isatty(STDOUT_FILENO)) + f_color = 1; break; case 'L': fts_options &= ~FTS_PHYSICAL; @ 1.1 log @shut up user_from_uid(3), group_from_gid(3) @ text @d1 2 a2 4 For NetBSD - hubertf --- ls.c.orig Thu Oct 23 14:12:16 1997 +++ ls.c Thu Oct 23 14:13:44 1997 d12 10 @