Skip to content
nerima-lispPublic

About

Modern, fish-inspired interactive shell written in Common Lisp

Topics

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

nshell

CI License: MIT Documentation

nshell is a fish-inspired interactive shell written in Common Lisp for SBCL. It provides syntax highlighting, history-aware autosuggestions, abbreviations, and context-aware completion.

Status: development preview (0.6.x). CI tests the interactive editor and pipeline execution on x86_64-linux. The shell language implements a subset of POSIX/fish semantics; it is not a script-compatible /bin/sh replacement.

Documentation source lives in docs/src/.

Quick Start

The release and Nix flake support x86_64-linux only. With Nix and flakes enabled:

nix run github:nerima-lisp/nshell/v0.6.1

Then type as you would in any shell. 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:

~/src/nshell main ❯ string upper hello
HELLO

After running that command, type string up to see per hello suggested from history.

Colors come from a theme; run theme list to see the built-in presets and theme use dracula (or any other name from that list) to switch, live, with no restart needed.

Interactive history expansion supports !!, !$, !-N, !?text?, and !prefix; exclamation marks inside single quotes or preceded by a backslash remain literal. Press Alt-E to edit the current command in the editor named by NSHELL_EDITOR, VISUAL, or EDITOR (falling back to vi), then return the edited line to nshell.

Install

nix profile install github:nerima-lisp/nshell/v0.6.1

Pin a release tag rather than following the default branch.

The x86_64-linux release bundle removes Nix store references, carries its ELF runtime library closure, and is checked for required files and dependency metadata. CI also runs --help, --version, and an echo smoke test on the bundle. See Getting started for the bundle verification and installation procedure.

Documentation

Development

nix develop          # SBCL with CL_SOURCE_REGISTRY already set (x86_64-linux)
perl -e '$SIG{ALRM}=sub { exit 124 }; alarm 300; exec @ARGV' nix build .#checks.$(nix eval --raw --impure --expr 'builtins.currentSystem').default --no-link  # run the test suite
perl -e '$SIG{ALRM}=sub { exit 124 }; alarm 300; exec @ARGV' nix flake check      # full hermetic gate on x86_64-linux CI
nix fmt              # format Nix sources (treefmt)
nix build            # produces ./result/bin/nshell
nix build .#releaseBundle
perl scripts/verify-release-bundle.pl result

The Perl wrappers limit each local check to five minutes and return exit code 124 if that limit expires.

To measure executable-source coverage, keep the report outside the checkout and run the same hermetic test loader used by CI:

NSHELL_COVERAGE_DIR="$(mktemp -d)" \
  nix develop -c sbcl --script scripts/coverage.lisp

The command writes coverage-summary.json and coverage-files.json to the selected directory. These reports cover executable source under src/, excluding declarative data and package-definition files. The default minimum is 85% (NSHELL_COVERAGE_MIN); the target is 100% (NSHELL_COVERAGE_TARGET).

Tests live in t/ and run under cl-weave, the org's test framework. Cases needing a real PTY, stty, or external binaries cannot run in the Nix sandbox and are covered by CI's separate integration job; run them locally with the command in Recipes.

Benchmark commands and evidence boundaries are documented in Performance evidence.

Contributing

See the org-wide CONTRIBUTING guide and the package standard.

Support

See SUPPORT. Report vulnerabilities privately per this repository's security policy rather than a public issue.

License

MIT. See LICENSE.

About

Modern, fish-inspired interactive shell written in Common Lisp

Topics

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages