Skip to content

Commit

Permalink
Merge branch 'main' into string-subst
Browse files Browse the repository at this point in the history
  • Loading branch information
prsabahrami authored Oct 8, 2024
2 parents bc4fa13 + d555365 commit 59283ad
Show file tree
Hide file tree
Showing 11 changed files with 653 additions and 43 deletions.
99 changes: 77 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ cargo r

# To run a script
cargo r -- ./scripts/hello_world.sh

# To run a script and continue in interactive mode
cargo r -- ./scripts/hello_world.sh --interact
```

## License
Expand Down
6 changes: 3 additions & 3 deletions crates/deno_task_shell/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ tokio-util = { version = "0.7.12", optional = true }
os_pipe = { version = "1.2.1", optional = true }
serde = { version = "1", features = ["derive"], optional = true }
thiserror = "1.0.63"
pest = { git = "https://github.com/pest-parser/pest.git", branch = "master", features = ["miette-error"] }
pest = { version="2.7.13", features = ["miette-error"] }
pest_derive = "2.7.12"
dirs = "5.0.1"
pest_ascii_tree = { git = "https://github.com/prsabahrami/pest_ascii_tree.git", branch = "master" }
miette = "7.2.0"
pest_ascii_tree = "0.1.0"
miette = { version = "7.2.0", features = ["fancy"] }
lazy_static = "1.4.0"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/deno_task_shell/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1585,7 +1585,7 @@ fn parse_quoted_word(pair: Pair<Rule>) -> Result<WordPart> {
parts.push(WordPart::Command(command));
}
Rule::VARIABLE => {
parts.push(WordPart::Variable(part.as_str()[1..].to_string(), None))
parts.push(WordPart::Variable(part.as_str().to_string()))
}
Rule::QUOTED_CHAR => {
if let Some(WordPart::Text(ref mut s)) = parts.last_mut() {
Expand Down
8 changes: 7 additions & 1 deletion crates/shell/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,15 @@ uu_ls = "0.0.27"
dirs = "5.0.1"
which = "6.0.3"
uu_uname = "0.0.27"
uu_touch = "0.0.27"
uu_date = "0.0.27"
miette = { version = "7.2.0", features = ["fancy"] }
filetime = "0.2.25"
chrono = "0.4.38"
parse_datetime = "0.6.0"
dtparse = "2.0.1"
windows-sys = "0.59.0"
ctrlc = "3.4.5"
miette = { version="7.2.0", features = ["fancy"] }

[package.metadata.release]
# Dont publish the binary
Expand Down
6 changes: 6 additions & 0 deletions crates/shell/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ use uu_ls::uumain as uu_ls;
use crate::execute;

pub mod date;
pub mod touch;
pub mod uname;
pub mod which;

pub use date::DateCommand;
pub use touch::TouchCommand;
pub use uname::UnameCommand;
pub use which::WhichCommand;

Expand Down Expand Up @@ -46,6 +48,10 @@ pub fn get_commands() -> HashMap<String, Rc<dyn ShellCommand>> {
"uname".to_string(),
Rc::new(UnameCommand) as Rc<dyn ShellCommand>,
),
(
"touch".to_string(),
Rc::new(TouchCommand) as Rc<dyn ShellCommand>,
),
(
"date".to_string(),
Rc::new(DateCommand) as Rc<dyn ShellCommand>,
Expand Down
Loading

0 comments on commit 59283ad

Please sign in to comment.