We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c2364c commit 6222897Copy full SHA for 6222897
src/elements/subword/braced_param.rs
@@ -20,6 +20,7 @@ pub struct BracedParam {
20
pub name: String,
21
unknown: String,
22
is_array: bool,
23
+ is_special: bool,
24
subscript: Option<Subscript>,
25
has_alternative: bool,
26
alternative_symbol: Option<String>,
@@ -73,6 +74,10 @@ impl Subword for BracedParam {
73
74
}
75
76
if self.subscript.is_some() {
77
+ if self.is_special {
78
+ eprintln!("sush: {}: bad substitution", &self.text);
79
+ return false;
80
+ }
81
return self.subscript_operation(core);
82
83
@@ -292,6 +297,7 @@ impl BracedParam {
292
297
if len != 0 {
293
298
ans.name = feeder.consume(len);
294
299
ans.is_array = ans.name == "@";
300
+ ans.is_special = true;
295
301
ans.text += &ans.name;
296
302
return true;
303
0 commit comments