Package COM.INFORMATIMAGO.COMMON-LISP.INTERACTIVE.BROWSER


This package exports a function to browse the directory hierarchy
and load lisp files, and a few interactive commands:

CD, PWD, PUSHD, POPD, MKDIR,
LS, CAT, MORE, CP, MV, MAKE, GREP.


License:

    AGPL3
    
    Copyright Pascal J. Bourguignon 2002 - 2015
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.
    
    You should have received a copy of the GNU Affero General Public License
    along with this program.
    If not, see <http://www.gnu.org/licenses/>

*change-directory-hook*
variable
A list of unary functions called with the path of  the new current
working directory.  The default list contains a hook to set the
*DEFAULT-PATHNAME-DEFAULTS*.

A common usage is to set the unix current working directory to the
same directory, so that the *default-pathname-defaults*, the
*working-directory* and the unix current working directory are all
three synchronized.
Initial value: (CCL-CL UPDATE-DEFAULT-PATHNAME-DEFAULT)
*keep-dot-files*
variable
Whether dot-files should be shown.
Initial value: NIL
*shell*
variable
A function of one string argument executing it as a shell command.
Initial value: NIL
*terminal-height*
variable
The number of line displayed on the terminal.
Used by functions like MORE.
Initial value: 50
(browse)
function
COMMAND
DO:         Displays the contents of the working directory and
            allows the user to navigate in the directory tree and
            to load files.
(cat &rest paths)
function
COMMAND
SEE:        MORE
DO:         Same as more, but force no pagination.
(cd &optional path)
function
COMMAND
DO:         Change the working directory.
ARGUMENTS:  The path of the new working directory.
            If not given, then change to the user home directory.
(change-working-directory path)
function
DO:     Sets *WORKING-DIRECTORY* to the new PATH, if it exists and is a directory path.
        Runs the hooks on *CHANGE-DIRECTORY-HOOK*.
RETURN: *WORKING-DIRECTORY*
(cp &rest args)
macro
COMMAND
Runs the CP command.
(defcommand name &optional docstring)
macro
Define a macro named NAME taking any number of arguments, and
calling the external program of same name thru the shell.
(less &rest args)
function
COMMAND
SEE:        MORE
(ls &rest args)
function
COMMAND
DO:         List the files or directories.
OPTIONS:    -L long listing: item kind, size, date, name; otherwise only name.
            -A all entries: list also entries whose name starts with a dot or ends with a tilde.
ARGUMENTS:  A list of paths possibly containing wildcards.
            If none is given, then "*" is used.
(make &rest args)
macro
COMMAND
Runs the MAKE command.
(mkdir dir &rest other-dirs)
function
COMMAND
DO:         Create the directories.
ARGUMENTS:  A list of paths. If name or type is not nil, then the file name
            is taken as the last item in the directory path.
(more &rest args)
function
COMMAND
DO:         concatenate and paginate a list of files.
ARGUMENTS:  If the first argument is :PAGE,
            then the second arguments is
            either an integer giving the page height,
            or NIL indicating that no pagination must be done;
            else the page height is *TERMINAL-HEGIHT*.
            The other arguments are paths of files to be dumped
            on *STANDARD-OUTPUT*; a string-designator for "-"
            represents *STANDARD-INPUT*.
            If no path is given, only *STANDARD-INPUT* is processed.
(mv &rest args)
macro
COMMAND
Runs the MV command.
(popd)
function
COMMAND
DO:         Unstack the working directory from the stack.
(pushd &optional path)
function
COMMAND
DO:         Push the current working directory onto the stack, and
            change the working directory to the path (or home directory).
SEE;        POPD, CD.
(pwd)
function
COMMAND
DO:         Returns the current working directory.
(working-directory)
function
RETURN: The working directory.