GithubHelp home page GithubHelp logo

tawawhite / nim-prompt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from surf1nb1rd/nim-prompt

0.0 1.0 0.0 8 KB

Building powerful interactive prompts in Nim, inspired by python-prompt-toolkit.

License: BSD 2-Clause "Simplified" License

Nim 100.00%

nim-prompt's Introduction

nim-prompt

Software License

A library for building powerful interactive prompts inspired by python-prompt-toolkit, making it easier to build cross-platform command line tools using Nim.

Projects using nim-prompt

  • nim-chronicles. The log filtering tool chronicles_tail was the original project that lead to the creation of this library.

Features

Powerful auto-completion

Keyboard Shortcuts

The provided shortcuts should be familiar to most Windows, macOS and Linux users.

Key Binding Description
Home, Ctrl + A Go to the beginning of the line
End, Ctrl + E Go to the end of the line
Up Arrow, Ctrl + P Previous command, Previous completion
Down Arrow, Ctrl + N Next command, Next completion
Right Arrow, Ctrl + F Forward one character
Left Arrow, Ctrl + B Backward one character
Ctrl + Right Arrow, Alt + F Move to next word
Ctrl + Left Arrow, Alt + B Move to previous word
Delete, Ctrl + D Delete character under the cursor
Backspace, Ctrl + H Delete character before the cursor
Ctrl + Delete Delete to end of word
Ctrl + Backspace Delete to beginning of word
Tab Trigger auto-complete, Select next completion
Ctrl + L Clear the screen
Enter, Ctrl + J Accept line

History

You can use Up arrow and Down arrow to walk through the history of commands executed. An optional history file can be specified for each user program.

Unicode aware

nim-prompt will correctly handle and display all unicode characters. In the public API, all procs use UTF-8 encoded strings on all platforms.

Multiple platform support

We have confirmed nim-prompt works fine in the following terminals:

  • iTerm2, Terminal.app (macOS)
  • Command Prompt (Windows)
  • gnome-terminal (Ubuntu)

License

This software is licensed under the BSD 2-Clause license, see LICENSE for more information.

nim-prompt's People

Contributors

surf1nb1rd avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.