Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
inferior-shell
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
qitab
inferior-shell
Commits
b1e296d9
Commit
b1e296d9
authored
13 years ago
by
Francois-Rene Rideau
Browse files
Options
Downloads
Patches
Plain Diff
More documentation.
parent
7a04847b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README
+56
-7
56 additions, 7 deletions
README
with
56 additions
and
7 deletions
README
+
56
−
7
View file @
b1e296d9
...
...
@@ -29,13 +29,62 @@ that exports the following macros and functions:
(TO BE DOCUMENTED. IN THE MEANTIME, CONSULT THE SOURCES)
PARSE-PROCESS-SPEC
PRINT-PROCESS-SPEC
RUN
RUN/LINES
RUN/S
RUN/SS
PARSE-PROCESS-SPEC SPEC
parse an expression in the process-spec mini-language into
objects specifying a pipeline of processes to be executed.
See the PROCESS-SPEC mini-language below.
PRINT-PROCESS-SPEC SPEC &OPTIONAL OUTPUT
print a process specification to given OUTPUT
into a portable form usable by a Unix shell.
OUTPUT is as per FORMAT's stream output argument,
defaults to NIL for returning the result as a string.
SPEC can be a parsed PROCESS-SPEC object,
a CONS to be parsed by PARSE-PROCESS-SPEC,
or a string for a process-spec that has already been formatted.
*CURRENT-HOST-NAMES*
a variable, a list of strings, the aliases for the localhost.
CURRENT-HOST-NAME-P X
a function, returns true if X is a string member of *CURRENT-HOST-NAMES*
INITIALIZE-CURRENT-HOST-NAMES
function that initializes the *CURRENT-HOST-NAMES*
with "localhost" and the results from $(hostname -s) and $(hostname -f).
RUN CMD &KEY ON-ERROR TIME SHOW HOST OUTPUT
RUN will execute the given command CMD, which can be
a CONS to be parsed by PARSE-PROCESS-SPEC,
a PROCESS-SPEC object already parsed,
or a string to be passed to a Unix shell.
ON-ERROR specifies behavior in case the command doesn't successfully exit
with exit code 0, as per FARE-UTILS's ERROR-BEHAVIOUR provided with
(if a function, invoke it, if a string, issue an error with it,
otherwise return it as is).
TIME is a boolean which if true causes the execution to be timed as per TIME.
SHOW is a boolean which if true causes a message to be sent
to the *TRACE-OUTPUT* before execution.
HOST is either NIL (execute on localhost) or a string specifying a host
on which to run the command using ssh if
it's not an alias for localhost as recognized by CURRENT-HOST-NAME-P
(be sure to have passphraseless login using ssh-agent).
On Windows, RUN will not succeed for pipes, only for simple commands.
On Unix, simple commands on localhost are executed directly, but
remote commands and pipes are executed by spawning a shell.
RUN/S CMD &KEY ON-ERROR TIME SHOW HOST
RUN/S is a shorthand for RUN :OUTPUT 'STRING,
returning as a string what the inferior command sent to its standard output.
RUN/SS CMD &KEY ON-ERROR TIME SHOW HOST
RUN/SS calls RUN/S then strips any line-ending at the end of the results,
just like a shell's `cmd` or $(cmd) would do.
RUN/LINES CMD &KEY ON-ERROR TIME SHOW HOST
run/lines is a shorthand for RUN :OUTPUT :LINES,
returning as a list of one string per line (stripped of line-ending)
what the inferior command sent to its standard output.
==== THE PROCESS-SPEC MINI-LANGUAGE ====
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment