← 全部工具

nerima-lisp/nshell

热度 75 更新于 网络与系统管理

Modern, fish-inspired interactive shell written in Common Lisp

githubauto-collected

安装

暂未验证可直接使用的安装命令,请查看项目官方文档或 Release。

nshell

nshell is a modern, fish-inspired interactive shell written in Common Lisp for SBCL. It puts the interactive experience first — real-time syntax highlighting, history-aware autosuggestions, fish-style abbreviations, and a context-aware completion engine driven by a logic knowledge base — on top of a domain-driven core whose line editor is a pure reducer over an immutable input state, and a reproducible Nix build that packages a dumped SBCL image with its process-launch helper.

Status: development preview (0.4.x). The interactive editor and core pipeline execution are solid and heavily tested. The shell language is a growing subset of POSIX/fish semantics. nshell is usable as a daily interactive shell for common workflows; it is not a script-compatible /bin/sh replacement.

Full documentation is published at <https://nerima-lisp.github.io/nshell/. The source for that site lives in docs/src/.

Quick Start

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

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 ❯ git com               # "mit -m " suggested from history
~/src/nshell main ❯ string upper hello
HELLO

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 NSHELLEDITOR, VISUAL, or EDITOR (falling back to vi), then return the edited line to nshell.

Install

nix profile install github:nerima-lisp/nshell/v0.4.0
# flake.nix
inputs.nshell = {
  url = "github:nerima-lisp/nshell/v0.4.0";
  inputs.nixpkgs.follows = "nixpkgs";
};

Pin a release tag rather than following the default branch. The supported platforms are x8664-linux and aarch64-darwin; other systems are currently outside the tested support boundary.

Release artifact warning: the tarballs attached to v0.4.0 are not portable and can retain Nix store dependencies. No portable binary release has been published yet. Use the pinned Nix commands above until a later release explicitly identifies its bundles as portable. See Getting started for the future bundle verification and installation procedure.

Documentation

  • Getting started
  • Core concepts
  • Built-in commands
  • Architecture

Development