ILS
Section: User Commands (1)
Updated: local
Index
Return to Main Contents
NAME
ils - interactive directory browser and visual shell
SYNOPSIS
ils [-aFeTr<rows>c<columns> [title]] [ pattern1 pattern2 ... patternN ]
DESCRIPTION
ils
was orginally just a driectory browsing utility to allow users
to move around the system, descending into directories through
a visually-oriented interface.
Since the original implementation, the functionality of
ils
has been expanded to allow operations to be performed on the files in the
directories currently being examined. Each user can define their own set of
operations using built-in variables, environment variables, as well as
keyboard input. By creating a file, ``.ils" in the $HOME directory,
each user can define what sequence of keys invokes a set of shell
operations.
There are several options, some of which corresponds to the option of
the same name in the
ls(1)
command:
- -a
-
List all entries; usually `.', `..' and all files that start with a `.'
are suppresed. This is the default if the last character of the name
of the program is an `a' (i.e., linking ila to ils).
- -F
-
Cause directories to be marked with a trailing `/' and executable files
to be marked with a trailing `*'. This is the default if the last
character of the name of the program is a `f' (i.e., linking ilf to ils).
- -e
-
Echo all commands as they are executed.
- -T <title>
-
Print a title on top of the window or screen.
- -r
-
Change the vertical size of the ils window from the default. The default is the
size of the screen upon calling ils. If using this option, the
number of rows must immediately follow, with no white space (i.e., ils -r10).
-
Change the horizontal size of the ils window from the default. The default
is the size of the screen upon calling ils. If using this option, the
number of columns must immediately follow, with no white space (i.e., ils -r60).
WILDCARDING
Patterns can be used in to match files, just as in ls(1). To
pass a pattern to ils, and to avoid the shell from
expanding it prior to invoking ils, the user can surround
the pattern with quotes (i.e., 'ils "*.c"' instead of ils *.c).
This will insure that the pattern match is done on every directory
descended into during the execution of ils. Otherwise, if no
quotes are used, the shell will expand the wildarding and pass ils
all filenames that match the pattern in the current working directory.
Any directory descended into that do not contain any files of the same name
will appear to the user as an empty directory.
ils
wildcarding works exactly the same as sh(1), csh(1), and ksh(1)
wildcarding (thanks to Rich Salz for the wildcarding routine).
THE .ils FILE
Each user can set up their own .ils file in their home ($HOME) directory
to define their own key sequences and corresponding actions related to
those key sequences. The .ils file has the following format:
key_sequence: command line 1
command line 2
...
command line n
This tells
ils
that when the key sequence is entered, execute the shell commands
in command lines 1 through n. One current limitation
ils
has is that each command line is executed seperately, so that
no interdependent lines can be used. A call to system(3) is made on
each line, so a new shell comes into existance for each line.
Any environmental changes made such as shell variable assignment
or change of working directory are lost after each command.
You can, however, have multiple shell commands on one line by using
semicolons delimiting seperate commands.
All lines that have a `#' character as the first character are
assumed to be comments and are skipped.
USING ils
upon execution, the user will see a listing of the directory,
very similar to the output of the
ls(1)
command. On the top line is the path of the current directory.
If possible,
ils
will display the full path of the current working directory. If the
path exceeds the width of the screen or window, it will be truncated.
Since the right-most characters of a pathname are usually of the most interest,
the truncation is done at the left end. As many characters as will fit
are shown, and the path is preceeded by "...".
One file is always the "current file", it is pointed at by the
ils
cursor `>'. To change the current file, there are cursor movement
keys. The defaults are h,j,k and l (as in vi(1)). If a directory
has been made the current file, the user can descend into the directory
by pressing the RETURN or ENTER key. Once the user has descended into
a directory the directory becomes the current working directory. The
current path on the top line will be updated, and the contents of the
directory will be shown on the screen.
The user can also ``force" a command from the keyboard by pressing
the ':' key. This will prompt the user for a line of input which will
be scaned for variable substitution, then executed via a call to system(3).
This can be useful in that it makes it so that the user rarely has to
leave ils to perform a command (i.e, ":rm *.o" will invoke a shell
and remove all file ending in ".o"; ":more $file" will invoke a shell
and display the cuurently selected file via the more(1) command).
To go back up one level (i.e., cd ..), press ESCAPE.
To exit ils, press control-D.
KEYBOARD INPUT and STRING EDITING
When entering string from the keyboard, there is one important
thing to remember: you are always in insert mode.
The string editing routines in
ils
use the following keys:
- ESCAPE
-
Abort editing this string
- control-x
-
Delete a character
- control-c
-
Clear entire string
- left-arrow
-
Go left one character within the string
- ENTER(orRETURN)
-
The first ENTER puts you at the end of the string, the second ENTER
will pass the string back to ils for processing, and terminate the
string edit. If you are already on the last character in the string,
then the first press of ENTER will enter the string.
All of the command keys used in editing can be easily changed by modifying
the file "ils.h", then re-making ils. In a later release, it is hoped that
each user can define their editing key within their ".ils" file.
VARIABLES AND BUILT-IN COMMANDS
ils
has several variables and commands built-in:
- $file
-
the name of the file currently selected
- $prefix
-
the prefix (all characters up to the first `.') of the
file currently selected
- $path
-
the current directory being viewed
- $all_files
-
all files in the directory being viewed
- $input(prompt)
-
value typed in from keyboard after user is prompted with the string
contained in prompt (variable names can be used in contructing prompt)
- $ENVIRONMENT_VARIABLE
-
the value of any environment variable can be used (i.e., $HOME will
be substituted with the value of $HOME in the user's environment).
ils
will use it's own variable values before checking for any existing
environment variables. This means that is the user wants to
use the value of the variable $file from his environment,
ils
will use the name of the current file instead, since $file is
a built-in variable.
SAMPLE .ils FILE
# This is a sample .ils file
#
cc: cc $file
RM: rm $file
V: vi $file
# make, can change default by entering an alernative
# (i.e., "make install")
M: make $input(Make what (RETURN is default)? )
# rename the file
mv: mv $file (Rename $file to: )
# LateX a file and print it
L: latex $prefix
dvijep $prefix
lpr -b $prefix.jep
# look at my definition file
defs: more $HOME/.ils
RELEASE NOTES
AUTHOR
Jack Alexander, (jack@jimi.cs.unlv.edu), (jack@equinox.unr.edu)
BUGS
No known bugs
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- WILDCARDING
-
- THE .ils FILE
-
- USING ils
-
- KEYBOARD INPUT and STRING EDITING
-
- VARIABLES AND BUILT-IN COMMANDS
-
- SAMPLE .ils FILE
-
- RELEASE NOTES
-
- AUTHOR
-
- BUGS
-
This document was created by
man2html,
using the manual pages.
Time: 06:20:05 GMT, December 12, 2024