removed placeholder text in prompt

cd no longer panics if the given directory doesn't exist (wtf?)
This commit is contained in:
2025-05-29 01:29:25 -04:00
parent 4465a4f6f6
commit 220f636ebd
6 changed files with 37 additions and 7 deletions

View File

@@ -322,6 +322,7 @@ impl LexStream {
let slice = self.slice_from_cursor().unwrap().to_string();
let mut pos = self.cursor;
let mut chars = slice.chars().peekable();
let mut can_be_subshell = chars.peek() == Some(&'(');
if self.flags.contains(LexFlags::IN_CASE) {
if let Some(count) = case_pat_lookahead(chars.clone()) {
@@ -501,7 +502,7 @@ impl LexStream {
self.cursor = pos;
return Ok(cmdsub_tk)
}
'(' if self.next_is_cmd() => {
'(' if self.next_is_cmd() && can_be_subshell => {
pos += 1;
let mut paren_count = 1;
let paren_pos = pos;