-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* integrate with reedline history * add reedline source * remove reedline ; * add reedline source again * expose ReadlineError * use reedline reuslt * refactor context and runtime
- Loading branch information
1 parent
aa05667
commit 9751132
Showing
98 changed files
with
16,277 additions
and
175 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,5 @@ | ||
[package] | ||
name = "shrs" | ||
version = "0.1.0" | ||
edition = "2021" | ||
license = "MIT OR Apache-2.0" | ||
authors = ["MrPicklePinosaur"] | ||
description = "modular library to build your own shell in rust" | ||
repository = "https://github.com/MrPicklePinosaur/sh.rs" | ||
build = "build.rs" | ||
|
||
[dependencies] | ||
lalrpop-util = { version = "0.19.8", features = ["lexer"] } | ||
regex = "1" | ||
signal-hook = "0.3" | ||
crossbeam-channel = "0.5" | ||
clap = { version = "4.1", features = ["derive"] } | ||
|
||
reedline = "0.16" | ||
|
||
pino_deref = "0.1" | ||
|
||
thiserror = "1" | ||
anyhow = "1" | ||
|
||
[dev-dependencies] | ||
rexpect = "0.5" | ||
|
||
[build-dependencies] | ||
lalrpop = { version = "0.19.8", features = ["lexer"] } | ||
|
||
[[example]] | ||
name = "simple" | ||
[workspace] | ||
members = [ | ||
"shrs_lib", | ||
"reedline" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
name: Bug report | ||
about: Something doesn't work as expected or is broken | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Platform** e.g. macOS, Windows 10, ... | ||
**Terminal software** e.g. gnome-terminal, Apple Terminal.app, ... | ||
|
||
Describe the problem you are observing. | ||
|
||
## Steps to reproduce | ||
1. minimal posssible steps necessary | ||
2. to cause the problem | ||
|
||
## Screenshots/Screencaptures | ||
|
||
Very helpful if the display doesn't seem to work |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
name: Missing feature | ||
about: Suggest an idea for reedline | ||
title: '' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
Let us know about features you really want to see in reedline. | ||
|
||
## References | ||
|
||
If the feature you are interested in exists in other shells or terminal editors, please share links to documentation or screenshots to easily communicate the desired behavior! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
on: | ||
pull_request: | ||
push: # Run CI on the main branch after every merge. This is important to fill the GitHub Actions cache in a way that pull requests can see it | ||
branches: | ||
- main | ||
|
||
name: continuous-integration | ||
|
||
jobs: | ||
build-lint-test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [ubuntu-latest] | ||
rust: | ||
- stable | ||
# Define the feature sets that will be built here (for caching you define a separate name) | ||
style: [bashisms, default, sqlite, basqlite, external_printer] | ||
include: | ||
- style: bashisms | ||
flags: "--features bashisms" | ||
- style: external_printer | ||
flags: "--features external_printer" | ||
- style: default | ||
flags: "" | ||
- style: sqlite | ||
flags: "--features sqlite" | ||
- style: basqlite | ||
flags: "--features bashisms,sqlite" | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Rust toolchain | ||
uses: actions-rust-lang/[email protected] | ||
|
||
- name: Setup nextest | ||
uses: taiki-e/install-action@nextest | ||
|
||
- name: Rustfmt | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
- name: Clippy | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: clippy | ||
args: ${{ matrix.flags }} --all -- -D warnings | ||
|
||
|
||
- name: Tests | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: nextest | ||
args: run --all ${{ matrix.flags }} | ||
|
||
- name: Doctests | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: test | ||
args: --doc ${{ matrix.flags }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
target/ | ||
history.txt | ||
history.sqlite3* | ||
.DS_Store | ||
target-coverage/ | ||
tarpaulin-report.html | ||
.vscode | ||
.helix | ||
|
||
# ignore the git mailmap file | ||
.mailmap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Contributing | ||
|
||
reedline's development is primarily driven by the [nushell project](https://github.com/nushell) at the moment to provide its interactive REPL. | ||
Our goal is to explore options for a pleasant interaction with a shell and programming language. | ||
While the maintainers might currently prioritize working on features for nushell, we are open to ideas and contributions by people and projects interested in using reedline for other projects. | ||
Feel free to open an [issue](https://github.com/nushell/reedline/issues/new/choose) or chat with us on the [nushell discord](https://discordapp.com/invite/NtAbbGn) in the dedicated `#reedline` channel | ||
|
||
## Good starting points | ||
|
||
If you want to get started, check out the list of [issues](https://github.com/nushell/reedline/issues) with the ["good first issue" label](https://github.com/nushell/reedline/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). | ||
|
||
If you want to follow along with the history of how reedline got started, you can watch the [recordings](https://youtube.com/playlist?list=PLP2yfE2-FXdQw0I6O4YdIX_mzBeF5TDdv) of [JT](https://github.com/jntrnr)`s [live-coding streams](https://www.twitch.tv/jntrnr). | ||
|
||
[Playlist: Creating a line editor in Rust](https://youtube.com/playlist?list=PLP2yfE2-FXdQw0I6O4YdIX_mzBeF5TDdv) | ||
|
||
## Developing | ||
|
||
### Set up | ||
|
||
This is no different than other Rust projects. | ||
|
||
```bash | ||
git clone https://github.com/nushell/reedline | ||
cd reedline | ||
# To try our example program | ||
cargo run --example basic | ||
``` | ||
|
||
### Code style | ||
|
||
We follow the standard rust formatting style and conventions suggested by [clippy](https://github.com/rust-lang/rust-clippy). | ||
|
||
### To make the CI gods happy | ||
|
||
Before submitting a PR make sure to run: | ||
|
||
- for formatting | ||
|
||
```shell | ||
cargo fmt --all | ||
``` | ||
|
||
- the clippy lints | ||
|
||
```shell | ||
cargo clippy | ||
``` | ||
|
||
- the test suite | ||
|
||
```shell | ||
cargo test | ||
``` |
Oops, something went wrong.