Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 71 additions & 22 deletions Cargo.lock

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

4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ base64 = "0.22.1"
wincode = "0.5.2"
bindgen = "0.72.1"
bitflags = "2.10.0"
# The newest released version (0.3.0) of brush-parser has a bug that reports incorrect locations for some ast nodes.
# The latest commit has fixed it. TODO: switch back to released version when a new version is published.
brush-parser = { git = "https://github.com/reubeno/brush", rev = "dcb760933b10ee0433d7b740a5709b06f5c67c6b" }
brush-parser = "0.4.0"
bstr = { version = "1.12.0", default-features = false, features = ["alloc", "std"] }
bumpalo = { version = "3.17.0", features = ["allocator-api2"] }
bytemuck = { version = "1.23.0", features = ["extern_crate_alloc", "must_cast"] }
Expand Down
6 changes: 4 additions & 2 deletions crates/vite_shell/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{collections::BTreeMap, fmt::Display, ops::Range};

use brush_parser::{
Parser, ParserOptions,
Parser, ParserImpl, ParserOptions,
ast::{
AndOr, Assignment, AssignmentName, AssignmentValue, Command, CommandPrefix,
CommandPrefixOrSuffixItem, CommandSuffix, CompoundListItem, Pipeline, Program,
Expand Down Expand Up @@ -47,7 +47,9 @@ const PARSER_OPTIONS: ParserOptions = ParserOptions {
enable_extended_globbing: false,
posix_mode: true,
sh_mode: true,
tilde_expansion: false,
tilde_expansion_at_word_start: false,
tilde_expansion_after_colon: false,
parser_impl: ParserImpl::Peg,
};

/// Remove shell quoting from a word value, respecting quoting context.
Expand Down