ivy-prompt

command module
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2026 License: BSD-3-Clause Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

ivy-prompt

A line editor interface wrapper for Rob Pike's Ivy, an interpreter for an APL-like language. It provides a Readline-style input prompt with input history and tab-completion.

The original ivy command interacts with the world via standard input/output, integrating well with a Unix or Plan 9 environment or a text editor like Acme. However, if you prefer or are used to a mode of interaction more akin to Bash, Haskell's GHCi, or Python's REPL with an interactive line editor, then this project is for you.

Although Ivy is described by its creator as "a plaything," it should not be underestimated. Watch Russ Cox' videos of solutions for Advent of Code 2021 using Ivy for a demonstration of its capabilities or take the built-in tour with the )demo command.

Installation

First install Ivy itself, if you haven't already done so:

go install robpike.io/ivy@latest    # or @master if you want to use
                                    # the development version of Ivy.

The ivy binary needs to be in the PATH for ivy-prompt to locate it.

Then install this wrapper:

go install github.com/fzipp/ivy-prompt@latest

Run it:

ivy-prompt

Line Editing

See the liner documentation for a complete table of supported keystrokes / actions. Here's a small selection:

Keystroke Action
Tab Next completion
Up Previous match from history
Down Next match from history
Ctrl-L Clear screen (line is unmodified)
Ctrl-D (if line is empty) quit

Tab-Completion

Tab-completion works not only with built-in identifiers but also with user-defined variables and operators.

It is context-aware to some extent. For example, it will provide different completion options after )help , )get ", )save ", or sys " compared to the usual context.

Input History

The input history is preserved across sessions in a file named ivy_history within the ivy subdirectory, located within the user configuration directory. The specific location of this directory depends on the operating system:

Operating system Config directory
Linux/Unix $XDG_CONFIG_HOME/ivy/
macOS $HOME/Library/Application Support/ivy/
Windows %AppData%\ivy\

License

This project is free and open source software licensed under the BSD 3-Clause License.

Documentation

Overview

Ivy-prompt is a line editor interface wrapper for Rob Pike's Ivy, an APL-like big number calculator. It provides a Readline-style input prompt with an input history and tab-completion.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址