Previous: lepton-cli config, Up: lepton-cli - Lepton command-line utility [Contents][Index]
lepton-cli shell
provides an interactive Scheme Read-Eval-Print
Loop (REPL) for automating processing of schematic and symbol
files. It is designed to be used with the Lepton EDA Scheme API.
See Lepton EDA Scheme Reference Manual
for more information on which Lepton EDA Scheme procedures you can
use.
Usage:
lepton-cli shell [OPTION ...]
Options:
Prepend DIRECTORY to the list of directories to be searched for Scheme files.
Evaluate Scheme source code from FILE.
Evaluate Scheme source code from FILE, and exit.
Evaluate the Scheme expression EXPR, and exit.
Stop scanning arguments; run interactively.
The switches ‘-s’, ‘-c’ and ‘--’ stop argument
processing and pass all the remaining arguments as the value of
(command-line)
.
A couple of simple examples would not harm? Imagine you would want to find out the path to your user configuration directory. Type:
lepton-cli shell -c \ "(use-modules (lepton os)) (display (user-config-dir))" -| /home/user/.config/lepton-eda
Now, suppose you want to know where is better to put your system-wide configuration files:
lepton-cli shell -c \ "(use-modules (lepton os)) (display (sys-config-dirs))" -| (/etc/xdg/lepton-eda /usr/local/share/lepton-eda)
Hopefully, you don’t need this for any of your project’s directories ;-) But who knows... If so, try to compose a useful command yourself.