Skip to content

Commit 3e08905

Browse files
committed
feat: add nushell
1 parent 1b8c64c commit 3e08905

File tree

6 files changed

+27
-10
lines changed

6 files changed

+27
-10
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
plugin: .
2525
args: |
2626
fish echo "Hello, world!"
27+
nu which nu
2728
working-directory: example
2829
env:
2930
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description = "Set up your CI/CD Pipeline with a specific version of Cue"
66
edition = "2021"
77
license = "MIT"
88
name = "shell"
9-
version = "0.1.0"
9+
version = "0.1.1"
1010

1111
[lib]
1212
crate-type = [

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ fluentci run --wasm shell fish echo "Hello, World!"
2121
| bash | Run bash commands |
2222
| fish | Run fish commands |
2323
| zsh | Run zsh commands |
24+
| nu | Run nushell commands |
2425

2526
## Code Usage
2627

@@ -38,7 +39,7 @@ use fluentci_pdk::dag;
3839

3940
// ...
4041

41-
dag().call("https://pkg.fluentci.io/shell@v0.1.0?wasm=1", "bash", vec!["echo 'Hello, World!'"])?;
42+
dag().call("https://pkg.fluentci.io/shell@v0.1.1?wasm=1", "bash", vec!["echo 'Hello, World!'"])?;
4243
```
4344

4445
## 📚 Examples

fluentci.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
2-
name = "shell-plugin"
3-
version = "0.1.0"
2+
authors = [
3+
"Tsiry Sandratraina <tsiry.sndr@fluentci.io>",
4+
]
45
description = "Shell plugin for FluentCI"
5-
license = "MIT"
66
keywords = [
7-
"shell"
7+
"shell",
88
]
9-
authors = [
10-
"Tsiry Sandratraina <tsiry.sndr@fluentci.io>"
11-
]
9+
license = "MIT"
10+
name = "shell-plugin"
11+
version = "0.1.1"

src/lib.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,18 @@ pub fn zsh(args: String) -> FnResult<String> {
2727
.stdout()?;
2828
Ok(stdout)
2929
}
30+
31+
#[plugin_fn]
32+
pub fn nu(args: String) -> FnResult<String> {
33+
let stdout = dag()
34+
.pkgx()?
35+
.with_exec(vec![
36+
"pkgx",
37+
"+nushell.sh",
38+
"nu",
39+
"-c",
40+
&format!("'{}'", args),
41+
])?
42+
.stdout()?;
43+
Ok(stdout)
44+
}

0 commit comments

Comments
 (0)