Getting started¶
Run without installing¶
With Nix (flakes enabled):
Install¶
nix profile install github:nerima-lisp/nshell
nshell
man nshell # the manual page is installed alongside the binary
Consumers inside the nerima-lisp org pin a release tag rather than following the default branch:
# flake.nix
inputs.nshell = {
url = "github:nerima-lisp/nshell/v0.4.0";
inputs.nixpkgs.follows = "nixpkgs";
};
Prebuilt tarballs for x86_64-linux and aarch64-darwin, each with a SHA-256
checksum, are attached to every
GitHub release.
First commands¶
Start nshell and type as you would in any shell. The distinguishing behaviour
shows up while typing: commands and paths colorize live, and a dimmed
completion of the most recent matching history entry trails the cursor. Press
→ or Ctrl-F to accept it.
One-off command¶
Run a script¶
Script files support multiline blocks (functions, if/for/while/switch),
comments, and a #! shebang; arguments after the script name are available as
$argv. See
examples/ for a
runnable sample.
Command line¶
Usage: nshell [--help] [--version] [-c COMMAND [ARGS...]] [SCRIPT [ARGS...]]
Without arguments, nshell starts an interactive shell when stdin is a terminal
and reads batch input from stdin otherwise.
With -c/--command, nshell executes COMMAND once in batch mode; trailing ARGS
are available as $argv.
With SCRIPT, nshell runs the script file; trailing ARGS are available as $argv.
Build from source¶
nshell builds with SBCL and ASDF. The supported and tested path is Nix:
git clone https://github.com/nerima-lisp/nshell
cd nshell
nix build # produces ./result/bin/nshell
nix flake check # tests + formatting + docs, the same gate CI uses
nix develop # dev shell with SBCL + cl-weave
Inside nix develop, load the system into a REPL: