feat: add xshell
This commit is contained in:
15
README.md
15
README.md
@@ -5,6 +5,8 @@ Simple Rust Tests
|
|||||||
Project or files:
|
Project or files:
|
||||||
```
|
```
|
||||||
.
|
.
|
||||||
|
├── __concurrent
|
||||||
|
│ └── arc-swap
|
||||||
├── __crypto
|
├── __crypto
|
||||||
│ ├── btc-address
|
│ ├── btc-address
|
||||||
│ ├── crypto
|
│ ├── crypto
|
||||||
@@ -12,6 +14,7 @@ Project or files:
|
|||||||
│ ├── pwhash
|
│ ├── pwhash
|
||||||
│ ├── random
|
│ ├── random
|
||||||
│ ├── ring
|
│ ├── ring
|
||||||
|
│ ├── rsa
|
||||||
│ ├── secp256k1
|
│ ├── secp256k1
|
||||||
│ └── totp
|
│ └── totp
|
||||||
├── __database
|
├── __database
|
||||||
@@ -20,6 +23,8 @@ Project or files:
|
|||||||
├── __diff
|
├── __diff
|
||||||
│ ├── diffy
|
│ ├── diffy
|
||||||
│ └── prettydiff
|
│ └── prettydiff
|
||||||
|
├── __enclave
|
||||||
|
│ └── virt_enclave
|
||||||
├── __err
|
├── __err
|
||||||
│ ├── err_derive
|
│ ├── err_derive
|
||||||
│ └── quick_error
|
│ └── quick_error
|
||||||
@@ -28,6 +33,8 @@ Project or files:
|
|||||||
│ ├── cpp
|
│ ├── cpp
|
||||||
│ ├── jni
|
│ ├── jni
|
||||||
│ └── live-reload-rust
|
│ └── live-reload-rust
|
||||||
|
├── __fs
|
||||||
|
│ └── fuse
|
||||||
├── __image
|
├── __image
|
||||||
│ └── svg
|
│ └── svg
|
||||||
├── __lang
|
├── __lang
|
||||||
@@ -36,6 +43,7 @@ Project or files:
|
|||||||
│ ├── quickjs
|
│ ├── quickjs
|
||||||
│ └── sana
|
│ └── sana
|
||||||
├── __linux
|
├── __linux
|
||||||
|
│ ├── notify
|
||||||
│ ├── psutil
|
│ ├── psutil
|
||||||
│ └── sysinfo
|
│ └── sysinfo
|
||||||
├── __misc
|
├── __misc
|
||||||
@@ -45,6 +53,8 @@ Project or files:
|
|||||||
│ ├── smartstring
|
│ ├── smartstring
|
||||||
│ └── walkdir
|
│ └── walkdir
|
||||||
├── __network
|
├── __network
|
||||||
|
│ ├── ip
|
||||||
|
│ ├── nfqueue
|
||||||
│ ├── tcp
|
│ ├── tcp
|
||||||
│ └── udp_laminar
|
│ └── udp_laminar
|
||||||
├── __search
|
├── __search
|
||||||
@@ -56,6 +66,8 @@ Project or files:
|
|||||||
│ ├── encoding
|
│ ├── encoding
|
||||||
│ ├── flatbuffers
|
│ ├── flatbuffers
|
||||||
│ └── serde_json
|
│ └── serde_json
|
||||||
|
├── __shell
|
||||||
|
│ └── xshell
|
||||||
├── __std
|
├── __std
|
||||||
│ ├── async_await
|
│ ├── async_await
|
||||||
│ ├── into
|
│ ├── into
|
||||||
@@ -64,6 +76,7 @@ Project or files:
|
|||||||
│ └── thread
|
│ └── thread
|
||||||
├── __term
|
├── __term
|
||||||
│ ├── colored_msg
|
│ ├── colored_msg
|
||||||
|
│ ├── confy_table
|
||||||
│ ├── indicatif
|
│ ├── indicatif
|
||||||
│ └── term
|
│ └── term
|
||||||
├── __time
|
├── __time
|
||||||
@@ -107,7 +120,7 @@ Project or files:
|
|||||||
├── vec.rs
|
├── vec.rs
|
||||||
└── while.rs
|
└── while.rs
|
||||||
|
|
||||||
79 directories, 26 files
|
92 directories, 26 files
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
23
__shell/xshell/Cargo.lock
generated
Normal file
23
__shell/xshell/Cargo.lock
generated
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# This file is automatically @generated by Cargo.
|
||||||
|
# It is not intended for manual editing.
|
||||||
|
[[package]]
|
||||||
|
name = "xshell"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"xshell 0.1.6",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "xshell"
|
||||||
|
version = "0.1.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3e9bbfccbb2233e6b0473b7870d4b0811a402e9e249a5e8394e768e5a5c9c37d"
|
||||||
|
dependencies = [
|
||||||
|
"xshell-macros",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "xshell-macros"
|
||||||
|
version = "0.1.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b94f1c632d730a1704b21dc551a4c74fbed713cfa59593708f94943548206134"
|
||||||
12
__shell/xshell/Cargo.toml
Normal file
12
__shell/xshell/Cargo.toml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[package]
|
||||||
|
name = "xshell"
|
||||||
|
version = "0.1.0"
|
||||||
|
authors = ["Hatter Jiang <jht5945@gmail.com>"]
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
xshell = "0.1"
|
||||||
|
|
||||||
|
|
||||||
11
__shell/xshell/src/main.rs
Normal file
11
__shell/xshell/src/main.rs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
use xshell::{cmd, read_file};
|
||||||
|
|
||||||
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
|
let name = "World";
|
||||||
|
let output = cmd!("echo Hello {name}!").read()?;
|
||||||
|
println!("{}", output);
|
||||||
|
|
||||||
|
let err = read_file("feeling-lucky.txt").unwrap_err();
|
||||||
|
println!("cannot read file: {}", err);
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user