summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2020-11-20 15:39:29 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-11-22 01:14:20 +0700
commit9cffe6a94560d0874e4c72bae16de065ecdfccab (patch)
treeadebaa07586cbdd2ae3df4724b3b622b8c014a8d /system
parent7eec2a29897a61406ebf1ff3dd8da9b3506d3f1e (diff)
downloadslackbuilds-9cffe6a94560d0874e4c72bae16de065ecdfccab.tar.gz
system/Sl: Added (ls with enhancements)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/Sl/README24
-rw-r--r--system/Sl/README.upstream223
-rw-r--r--system/Sl/Sl.1110
-rw-r--r--system/Sl/Sl.SlackBuild52
-rw-r--r--system/Sl/Sl.info10
-rw-r--r--system/Sl/Sl.rst101
-rw-r--r--system/Sl/doinst.sh8
-rw-r--r--system/Sl/sl.tcl.example110
-rw-r--r--system/Sl/slack-desc19
9 files changed, 657 insertions, 0 deletions
diff --git a/system/Sl/README b/system/Sl/README
new file mode 100644
index 0000000000..97058f6a3a
--- /dev/null
+++ b/system/Sl/README
@@ -0,0 +1,24 @@
+Sl (ls with enhancements)
+
+sl takes the most common use of Unix ls, to display the files in a
+directory compactly in multiple columns, and makes it substantially
+more useful.
+
+sl groups files by purpose so you can mentally organize many files
+quickly; for instance, it collects HTML and PHP files together, as
+opposed to leaving them mixed up with supporting images, CSS, and
+JavaScript. sl points out interesting files, which include those that
+have been recently modified, read relatively recently, are relatively
+large, have warnings, or need to be checked in to or out of version
+control.
+
+sl is also aesthetically pleasing due to attention to layout and
+filtering as well as limiting color and text annotations to salient
+information.
+
+Since there's already an "sl" on SlackBuilds.org (in games/), this is
+called Sl. If you install it on a system that doesn't have games/sl
+installed, a /usr/bin/sl symlink will be created.
+
+The ".sl.tcl" referred to in the documentation is installed in the doc
+dir as "sl.tcl.example".
diff --git a/system/Sl/README.upstream b/system/Sl/README.upstream
new file mode 100644
index 0000000000..e258bfe683
--- /dev/null
+++ b/system/Sl/README.upstream
@@ -0,0 +1,223 @@
+ sl
+
+sl takes the most common use of Unix ls, to display the files in a directory
+compactly in multiple columns, and makes it substantially more useful.
+
+sl groups files by purpose so you can mentally organize many files quickly; for
+instance, it collects HTML and PHP files together, as opposed to leaving them
+mixed up with supporting images, CSS, and JavaScript. sl points out interesting
+files, which include those that have been recently modified, read relatively
+recently, are relatively large, have warnings, or need to be checked in to or
+out of version control.
+
+sl is also aesthetically pleasing due to attention to layout and filtering as
+well as limiting color and text annotations to salient information.
+
+ ----------------------------------------------------------------------------
+
+Screen Shots
+
+ls vs sl on WWW site:
+
+sl on a software development directory:
+
+sl on a collection (photos, audio, video, even apps):
+On this directory of music, which is managed by iTunes, we see all the albums by
+an artist. sl also shows /number of songs in each album, the relatively recent
+CD rips (which not coincidentally correspond to the latest two albums), which we
+ripped about 2 months ago (58 days) and 7 months ago (228 days). The summary
+line at bottom shows the total number of CDs and the (total number) of songs.
+Note that the directories were determined to hold audio material, and sorting
+works as it should with inital "The"s ignored. This display is useful for other
+kinds of hierarchy.
+
+Features
+
+ * sort
+ * group by purpose to organize and make understandable so many files
+ (like Apple II catalog arrangers, but automatically)
+ For subdirectories, look at the files they contain and if warranted
+ reclassify directory into image, audio, or video group.
+ * normalize: fold case for most groups (rather than all files starting
+ with an uppercase letter followed by all lowercase files), ignore
+ initial the/an/a, treat various word separators (space . _ -) as
+ equivalent
+ * numbers ordered properly (8.jpg before 10.jpg — no need for leading 0s
+ just for sorting)
+ * mark
+ * important (highlight in inverse colors)
+ * autosearch for keywords, such as "urgent" or "password"
+ * quickly see what's new by looking at recently changed files (think red
+ hot)
+ or recent relative to other files in that directory (think once hot now
+ still glowing orange)
+ * → files read relatively recently. The file you worked with more
+ recently than the others is often the one you're looking for now.
+ * large files relative to other files in that directory (indent by a
+ space — easy to pick out against column edge)
+ e.g., largest fonts may have CJK or extensive Unicode, largest among
+ source code may be site of heavy lifting, in directory of directories
+ call out ones with most files
+ * classification by trailing character (like ls -F): directory/, link->,
+ executable*, special_
+ * colorize directory, executable*, special (like ls -G, though more
+ subtle since have groupings and warnings)
+ * info
+ * spot info: brief, particularly relevant additional information on a
+ highly limited number of files. Since few files are targeted, this is
+ fast and avoids visual clutter. Standard spot info details the recently
+ read (-age), recently changed (<age, with < implying it may be earlier
+ if a download or sloppy copy reset the last modified time), and
+ relatively large (size-in-bytes). Per-file customizations can display,
+ for example, latest build time and build number next to Ant build.xml,
+ count of critical bugs filed against source code file, number of lines
+ in TODO list, warning if HTML has not been validated, you name it.
+ * /number of files in subdirectories, which can be a useful if rough
+ survey (this is not slow)
+ e.g., only 2 files, 1000 files, TOSORT/27, tests/27, Yosemite 2007
+ photos/316 vs Detroit photos/2
+ * summary line with counts and totals. Includes a count of .dotfiles,
+ which are rare outside of the home directory.
+ * filter
+ * ignore clutter: Emacs auto backup (like GNU ls -B), generated (Java
+ .class, C .o), C .h, Macintosh Desktop DB, TAGS
+ * identify series (like audiobook ch 01.mp3 ... audiobook ch 27.mp3) and
+ condense to first one plus count
+ e.g., DSC00423.jpg, DSC00424.jpg, DSC00427.jpg ... DSC01072.jpg ⇒
+ DSC00423.jpg...227. Also look at /dev.
+ * elision of shared prefixes reduces the amount of text to read and
+ implicitly clusters similar files. Here's one spectacular application.
+ * distill: If you are already familiar with a directory or it is very
+ large, use the -only command-line option to distill the listing to only
+ distinctive files. A file is considered distinctive if it's: recently
+ changed, recently read, a warning, or spot info. sl -only on /usr/bin
+ and OS X /Library/Fonts can be interesting.
+ * layout
+ * column widths tailored to what's needed by individual columns (as
+ opposed to uniform width by ls dictated by the single longest filename
+ in the directory), giving a more natural appearance and freeing space
+ for more columns
+ * if group title would be at bottom of column, bump to top of next column
+ if room
+ * shorten very f...ing long names if necessary to achieve multiple
+ columns. Shortened names retain the first characters of the file, file
+ suffix, and the first number which is usually a series number or year
+ or video resolution (1080p).
+ * warnings
+ * broken link X (base file moved, renamed, or deleted): symlink, ~ file
+ from Emacs backup or CVS previous version
+ * not readable by current user
+ * directory Writable by public
+ * directory not searchable/enterable (executable permission not set) by
+ current user
+ * peculiar permissions: owner can't read, group or public can write or
+ execute but not read, or owner has less permission than group or
+ public. For example, a dropbox directory may display permissions
+ rwx-wx-wx
+ * special permission bits: setuid, setgid, sticky. These are not errors,
+ but something to be aware of.
+ * file 0-length or directory is empty, directory contains only 1 file
+ (Strunk and White: "omit needless hierarchy")
+ * file has 2 or more ← hard links. Under normal conditions, a file has
+ exactly 1 (from its parent directory).
+ * file changed vis-a-vis version control: either local copy has been
+ edited and needs to be uploaded^ to repository, or another worker
+ updated the repository rendering the local copy stale and in need of
+ downloadingv (stale files checked only in local repositories, not
+ remote servers, for performance). Support for RCS and CVS is built in,
+ and you can customize to add support for others.
+
+sl does not replace ls. Use ls to see all files and full metadata.
+
+Software
+
+for OS X, Solaris, Unix, and GNU/Linux
+Licensed under the GNU Public License version 3. NO WARRANTY.
+
+Install:
+ 1. Download software, probably to /usr/local/bin or ~/bin.
+ * v1.1.2 of February 16. Support filenames that are not UTF-8 and not
+ ASCII (thanks Christian Neukirchen).
+ * v1.1 of February 12. Support file sizes larger than 4GB on 32-bit
+ systems (thanks Giuseppe Merigo), tightened tolerances, new feature:
+ autosearch.
+ * v1.0 of January 26, 2012
+ 2. From the command line:
+
+ chmod +x download-dir/sl
+ unalias sl
+ rehash
+
+ 3. Install Tcl, if needed (which tclsh comes up empty). Install into
+ /usr/local/bin or change the first line of the sl script. Tcl is already
+ installed in OS X.
+
+Use: Now more-useful listings are as convenient to type as the usual ls.
+
+ sl directory-path
+
+Convenience: Automatically see an overview and interesting files when switching
+to a new directory:
+
+ alias cd 'cd \!*; sl'
+ alias pd 'pushd \!*; sl'
+ alias pdo 'pushd \!*; sl -only'
+
+Customization
+
+Customization is done via a startup file, at the path ~/.sl.tcl. You can control
+colors, new suffixes, localization of the most used text, switches that control
+system operation, and even exactly what is shown for every file. For example,
+here's a custom color scheme that makes files and directories brighter and
+blends the text annotations into the background.
+
+The startup file is executed as Tcl code, so you can implement substantial
+changes, such as adding support for another version control system. Rather than
+hacking the source code, it is better to put customizations in the startup file
+so that you can easily update to new versions without reapplying your hacks. Tcl
+lets you go so far as redefining whole procedures, so any change you want can be
+done in the startup file.
+ * .sl.tcl sample startup file, download to your home directory. It shows how
+ to make many of the most likely changes, as well as how to turn on features
+ that are too mind blowing to be the default settings, including prefix and
+ suffix elision.
+
+Support
+
+Troubleshooting:
+ * If you see lots of garbage that looks like ^[[31m, enable color for your
+ terminal or turn off color in your startup file.
+ * To change colors or bold on OS X, use Terminal's Preferences. Be sure to
+ pick a font that has a bold variation, such as Menlo.
+ * To view color output with less, set the LESS environment variable to include
+ --RAW-CONTROL-CHARS.
+ * Error reported no such file or directory, but file definitely exists. If you
+ have a legacy filesystem with filenames that are not encoded in Unicode
+ UTF-8 (or ASCII, which is a subset of UTF-8), you should migrate the names
+ to UTF-8 with a tool such as convmv. sl tries to handle this situation, but
+ for paths passed to it on the command line it is already too late.
+ * Previously, transposing the letters of ls was a misspelling. In some
+ systems, it resulted in a Command not found error. Some shells prepared for
+ this and aliased the transposition and other misspellings to in effect
+ autocorrect to what the user meant to type. If the output still looks like
+ ls, it's probably an alias. You can unalias in open terminals and take out
+ the line in the shell startup file. In another case, a Linux distribution
+ surprised you with ASCII art of a train. You can delete it, or if an ASCII
+ train is a key part of your problem-solving toolkit you can rename it.
+
+Known bugs:
+ * On OS X, the Spotlight search engine indexes the contents of files. As a
+ side effect of reading the content of a file, the file system updates the
+ file's last accessed time (atime). Because Spotlight is continuously
+ indexing, often within seconds of a file being changed, almost all files
+ have very recent atimes. For sl, this makes the atime useless for showing
+ recently accessed files: because everybody's special, nobody's special.
+ Spotlight should consider its work to be stealthy and reset the atime.
+ * Some file systems do not update atime, which is used to determine recently
+ read files.
+
+Send suggestions and bug reports to
+
+ ----------------------------------------------------------------------------
+
+Invented by Tom Phelps on December 30, 2011.
diff --git a/system/Sl/Sl.1 b/system/Sl/Sl.1
new file mode 100644
index 0000000000..2bf8b8e26c
--- /dev/null
+++ b/system/Sl/Sl.1
@@ -0,0 +1,110 @@
+.\" Man page generated from reStructuredText.
+.
+.TH SL 1 "2020-11-13" "1.1.3" "SlackBuilds.org"
+.SH NAME
+Sl \- ls with enhancements
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" RST source for Sl(1) man page. Convert with:
+.
+.\" rst2man.py Sl.rst > Sl.1
+.
+.\" rst2man.py comes from the SBo development/docutils package.
+.
+.SH SYNOPSIS
+.sp
+Sl [\fB\-1\fP] [\fB\-a\fP] [\fB\-atime\fP] [\fB\-only\fP] [\fB\-startup\fP] \fIstartup\-file\fP [\fB\-width\fP] \fIterminal\-width\fP [\fB\-log\fP] [\fB\-version\fP]
+.SH SBO NOTE
+.sp
+\fBSl\fP may also be run as \fBsl\fP, unless \fIgames/sl\fP is installed. The
+documentation here uses the lowercase version of the name.
+.SH DESCRIPTION
+.sp
+sl takes the most common use of Unix ls, to display the files in a
+directory compactly in multiple columns, and makes it substantially
+more useful.
+.sp
+sl groups files by purpose so you can mentally organize many files
+quickly; for instance, it collects HTML and PHP files together, as
+opposed to leaving them mixed up with supporting images, CSS, and
+JavaScript. sl points out interesting files, which include those that
+have been recently modified, read relatively recently, are relatively
+large, have warnings, or need to be checked in to or out of version
+control.
+.sp
+sl is also aesthetically pleasing due to attention to layout and
+filtering as well as limiting color and text annotations to salient
+information.
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.B \fB\-1\fP
+Single column output (same as ls)
+.TP
+.B \fB\-a\fP
+Show hidden (dot) files (same as ls)
+.TP
+.B \fB\-atime\fP
+Use access time instead of modification time, for marking "recent" files.
+.TP
+.B \fB\-only\fP
+Don\(aqt show summary (e.g. "6 files, 11K") at the end of the output
+.TP
+.B \fB\-startup\fP \fIfile.tcl\fP
+Use this startup file instead of \fI~/.sl.tcl\fP\&.
+.TP
+.B \fB\-width\fP \fIterminal\-width\fP
+Assume the terminal is this many columns wide. Default is to query the
+terminal via \fBstty(1)\fP, or the \fB$COLUMNS\fP environment variable.
+.TP
+.B \fB\-log\fP
+Print some debugging info (probably only useful if you\(aqre hacking sl\(aqs code)
+.TP
+.B \fB\-version\fP
+Output version number
+.UNINDENT
+.SH FILES
+.INDENT 0.0
+.TP
+.B \fB~/.sl.tcl\fP
+Startup file. See /usr/doc/Sl\-1.1.3/sl.tcl.example.
+.UNINDENT
+.SH COPYRIGHT
+.sp
+sl is licensed under the GNU Public License version 3.
+.SH AUTHORS
+.sp
+sl was written by Tom Phelps.
+.sp
+This man page written for the SlackBuilds.org project
+by B. Watson, and is licensed under the WTFPL.
+.SH SEE ALSO
+.sp
+The complete documentation: /usr/doc/Sl\-1.1.3/README.upstream
+.\" Generated by docutils manpage writer.
+.
diff --git a/system/Sl/Sl.SlackBuild b/system/Sl/Sl.SlackBuild
new file mode 100644
index 0000000000..6dfc1440e3
--- /dev/null
+++ b/system/Sl/Sl.SlackBuild
@@ -0,0 +1,52 @@
+#!/bin/sh
+
+# Slackware build script for Sl
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# There's already an "sl" on SBo, so this is named Sl. The version number
+# comes from the -version option.
+
+PRGNAM=Sl
+VERSION=${VERSION:-1.1.3}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+ARCH=noarch
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+SRCNAM="sl"
+
+PKGBIN=$PKG/usr/bin
+PKGMAN1=$PKG/usr/man/man1
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+PKGINST=$PKG/install
+
+set -e
+
+rm -rf $PKG
+mkdir -p $OUTPUT $PKGBIN $PKGDOC $PKGMAN1 $PKGINST
+
+# Look, Ma, no source directory!
+cat $SRCNAM > $PKGBIN/$PRGNAM
+chmod 755 $PKGBIN/$PRGNAM
+
+gzip -9c < $PRGNAM.1 > $PKGMAN1/$PRGNAM.1.gz
+
+# README.upstream is just a text rendition of the homepage, sl.tcl-example
+# is linked to by the homepage.
+cat README.upstream > $PKGDOC/README.txt
+cat sl.tcl.example > $PKGDOC/sl.tcl.example
+cat README > $PKGDOC/README_SBo.txt
+cat $PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
+
+cat slack-desc > $PKGINST/slack-desc
+cat doinst.sh > $PKGINST/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/Sl/Sl.info b/system/Sl/Sl.info
new file mode 100644
index 0000000000..37bd254292
--- /dev/null
+++ b/system/Sl/Sl.info
@@ -0,0 +1,10 @@
+PRGNAM="Sl"
+VERSION="1.1.3"
+HOMEPAGE="http://web.archive.org/web/20131228142311/http://practicalthought.com/sl/"
+DOWNLOAD="http://web.archive.org/web/20150726011829/http://practicalthought.com:80/sl/sl"
+MD5SUM="ed4c22a531e957c95df5f41206d6ed2f"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/system/Sl/Sl.rst b/system/Sl/Sl.rst
new file mode 100644
index 0000000000..c6d417d809
--- /dev/null
+++ b/system/Sl/Sl.rst
@@ -0,0 +1,101 @@
+.. RST source for Sl(1) man page. Convert with:
+.. rst2man.py Sl.rst > Sl.1
+.. rst2man.py comes from the SBo development/docutils package.
+
+.. |version| replace:: 1.1.3
+.. |date| date::
+
+==
+Sl
+==
+
+--------------------
+ls with enhancements
+--------------------
+
+:Manual section: 1
+:Manual group: SlackBuilds.org
+:Date: |date|
+:Version: |version|
+
+SYNOPSIS
+========
+
+Sl [**-1**] [**-a**] [**-atime**] [**-only**] [**-startup**] *startup-file* [**-width**] *terminal-width* [**-log**] [**-version**]
+
+SBO NOTE
+========
+
+**Sl** may also be run as **sl**, unless *games/sl* is installed. The
+documentation here uses the lowercase version of the name.
+
+DESCRIPTION
+===========
+
+sl takes the most common use of Unix ls, to display the files in a
+directory compactly in multiple columns, and makes it substantially
+more useful.
+
+sl groups files by purpose so you can mentally organize many files
+quickly; for instance, it collects HTML and PHP files together, as
+opposed to leaving them mixed up with supporting images, CSS, and
+JavaScript. sl points out interesting files, which include those that
+have been recently modified, read relatively recently, are relatively
+large, have warnings, or need to be checked in to or out of version
+control.
+
+sl is also aesthetically pleasing due to attention to layout and
+filtering as well as limiting color and text annotations to salient
+information.
+
+OPTIONS
+=======
+
+**-1**
+ Single column output (same as ls)
+
+**-a**
+ Show hidden (dot) files (same as ls)
+
+**-atime**
+ Use access time instead of modification time, for marking "recent" files.
+
+**-only**
+ Don't show summary (e.g. "6 files, 11K") at the end of the output
+
+**-startup** *file.tcl*
+ Use this startup file instead of *~/.sl.tcl*.
+
+**-width** *terminal-width*
+ Assume the terminal is this many columns wide. Default is to query the
+ terminal via **stty(1)**, or the **$COLUMNS** environment variable.
+
+**-log**
+ Print some debugging info (probably only useful if you're hacking sl's code)
+
+**-version**
+ Output version number
+
+FILES
+=====
+
+**~/.sl.tcl**
+ Startup file. See /usr/doc/Sl-|version|/sl.tcl.example.
+
+COPYRIGHT
+=========
+
+sl is licensed under the GNU Public License version 3.
+
+AUTHORS
+=======
+
+sl was written by Tom Phelps.
+
+This man page written for the SlackBuilds.org project
+by B. Watson, and is licensed under the WTFPL.
+
+SEE ALSO
+========
+
+The complete documentation: /usr/doc/Sl-|version|/README.upstream
diff --git a/system/Sl/doinst.sh b/system/Sl/doinst.sh
new file mode 100644
index 0000000000..604a5c77f7
--- /dev/null
+++ b/system/Sl/doinst.sh
@@ -0,0 +1,8 @@
+# If there's no sl link, take over:
+if [ ! -r usr/games/sl ]; then
+ ( cd usr/bin ; rm -rf sl )
+ ( cd usr/bin ; ln -sf Sl sl )
+ ( cd usr/man/man1 ; rm -rf sl.1.gz )
+ ( cd usr/man/man1 ; ln -sf Sl.1.gz sl.1.gz )
+fi
+
diff --git a/system/Sl/sl.tcl.example b/system/Sl/sl.tcl.example
new file mode 100644
index 0000000000..d5e0adf99d
--- /dev/null
+++ b/system/Sl/sl.tcl.example
@@ -0,0 +1,110 @@
+#
+# runtime configuration file for sl (http://www.PracticalThought.com/sl/)
+#
+
+
+
+# 1. override variables
+
+# turn off color
+#set COLORIZE 0
+
+# if your terminal supports Unicode characters, use them
+set I18N(...) "\u2026"
+
+set SWITCH(title) 1 ;# turn on prettyname
+set SWITCH(nosfx) 1 ;# once you know it's audio or video, don't care what arcane file format it is
+set SWITCH(prefix) 3 ;# turn on prefix elision
+
+# if your terminal supports 256 colors, these may be preferable
+# For other color codes, see colortest (http://www.vim.org/scripts/script.php?script_id=1349).
+array set STYLE {
+ file ";38;5;28" dir ";38;5;20"
+ relrec,file ";38;5;202" relrec,dir ";38;5;202"
+ warning ";38;5;196"
+ post ";38;5;232"
+}
+
+
+# add names to highlight or not show at all
+#append NOTABLE {|TODO$|notes|TOSORT}
+#append IGNORE {|^(tmp|old|obsolete|ignore|bkup)$}
+
+#set K 1000; # set K/M/G/T size suffixes to base 10 vs base 2
+
+# set TIME(recent) [expr $TIME(DAY)*2]
+
+#set COLSEP 4
+#set NAMEMIN 1000; # turn off name shortening
+
+# see supporting files like C .h and .o
+#set SWITCH(ignore) 2
+
+# consider .xml a document, not data
+#set EQ(.xml) doc
+
+# some Linux file systems do not update atime, so turn off to avoid stale information
+#set SWITCH(relread) 0
+
+# L10N
+set I18N(file) fecho
+
+
+
+# 2. per file hook to override properties
+# startup file gets tuple for each file fully loaded with data, just before display, to modify as he pleases
+proc perfile {dir tuple} {
+ global EQ
+
+ # a. unpack
+ lassign $tuple tail sfx type group sortkey style pre display warning post size mtime atime
+
+
+ # b. your changes here
+
+ # example: negate dir reclassification
+ if {$type=="directory"} {set group "dir"}
+
+ # example: show #lines of selected file
+ if {$tail=="sl" && $type=="file"} {
+ append post " [lindex [exec wc sl] 0]l"
+
+ # example: on Ant build.xml, show date and number of last build (<buildnumber /> task)
+ } elseif {$tail=="build.xml" && [file readable [set f "$dir/build.number"]]} {
+ set fid [open $f]; set txt [read $fid]; close $fid
+#puts $txt
+ regexp {build.number=(\d+)} $txt all num
+ if {$num!=""} {append post " #$num"}
+ append post "[reltime [file mtime $f]]"
+ }
+
+ # example: auto search for filename matching regexp and highlight (show in black on magenta background)
+ #if {[regexp -nocase {license|password} $tail]} {set style ";30;46"}
+
+ # example: local naming convention that puts date at start of file in form yyyymmdd-filename,
+ # but problematic for sorting by Tcl lsort -dictionary, so reformat
+ regsub {^(19|20)(\d\d)(\d\d)(\d\d\D)} $sortkey {\1\2.\3.\4} sortkey
+ regsub {^(19|20)(\d\d)(\d\d\D)} $sortkey {\1\2.\3} sortkey
+
+
+ # c. repack
+ return [list $tail $sfx $type $group $sortkey $style $pre $display $warning $post $size $mtime $atime]
+}
+
+
+
+# 3. redefine procs
+
+#proc vc {} ...
+
+# turn off series construction
+#set SWITCH(series) 0
+
+# change how names are shortened
+#proc shorten {txt w} {}
+
+# classify dir as plain dir, not audio/video and not separate uppercase/lowercase
+#proc classifydir {dir tail l} {return "dir"}
+
+# change evaluation of what constitutes a distinctive file for -only
+#proc distinctive {tuple} {return 1}
diff --git a/system/Sl/slack-desc b/system/Sl/slack-desc
new file mode 100644
index 0000000000..4b629ecc80
--- /dev/null
+++ b/system/Sl/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+Sl: Sl (ls with enhancements)
+Sl:
+Sl: sl takes the most common use of Unix ls, to display the files in a
+Sl: directory compactly in multiple columns, and makes it substantially
+Sl: more useful.
+Sl:
+Sl: sl groups files by purpose so you can mentally organize many files
+Sl: quickly; for instance, it collects HTML and PHP files together, as
+Sl: opposed to leaving them mixed up with supporting images, CSS, and
+Sl: JavaScript.
+Sl: