Fix: '?' and ';' must not be made into a string
This commit is contained in:
parent
d43a95406f
commit
a7664539c0
@ -1,5 +1,6 @@
|
||||
echo "$a" "$b"
|
||||
echo "$a$b"
|
||||
echo "$a$(:)"
|
||||
echo "$a/blædi/ "
|
||||
echo "$a/blædi/$b"
|
||||
echo "$a/blædi/$(
|
||||
@ -43,8 +44,14 @@ echo "$a/blædi/$(
|
||||
echo "${PWD}Z"
|
||||
echo "${PWD}_"
|
||||
)"
|
||||
echo "$a$(";")"
|
||||
echo "$a";";"
|
||||
echo "$a"|";"
|
||||
# Characters that must not be swallowed
|
||||
echo "$a"' '
|
||||
echo "$a" ""
|
||||
echo "$a"*":"
|
||||
echo "$a"?":"
|
||||
echo "$a";":"
|
||||
echo "$a"&":"
|
||||
echo "$a"|":"
|
||||
echo "$a"\;":"
|
||||
echo "$a">"/dev/null"
|
||||
echo "$a"<"/dev/null"
|
||||
|
@ -1,5 +1,6 @@
|
||||
echo $a $b
|
||||
echo $a$b
|
||||
echo $a`:`
|
||||
echo $a/blædi/" "
|
||||
echo $a/blædi/$b
|
||||
echo $a/blædi/$(
|
||||
@ -43,8 +44,14 @@ echo $a/blædi/$(
|
||||
echo $(pwd)"Z"
|
||||
echo $(pwd)"_"
|
||||
)
|
||||
echo $a`";"`
|
||||
echo $a;";"
|
||||
echo $a|";"
|
||||
# Characters that must not be swallowed
|
||||
echo $a' '
|
||||
echo $a ""
|
||||
echo $a*":"
|
||||
echo $a?":"
|
||||
echo $a;":"
|
||||
echo $a&":"
|
||||
echo $a|":"
|
||||
echo $a\;":"
|
||||
echo $a>"/dev/null"
|
||||
echo $a<"/dev/null"
|
||||
|
@ -16,6 +16,7 @@ use ::commonstrcmd::CommonStrCmdResult;
|
||||
use ::commonstrcmd::common_str_cmd;
|
||||
|
||||
use ::microparsers::predlen;
|
||||
use ::microparsers::is_word;
|
||||
|
||||
use ::sitstrdq::SitStrDq;
|
||||
|
||||
@ -38,7 +39,7 @@ impl Situation for SitStrPhantom {
|
||||
pre: mouthful, len: 1, alt: Some(b"")
|
||||
});
|
||||
}
|
||||
b'$' | b'\\' | b'`' => {
|
||||
b'$' | b'`' => {
|
||||
match common_str_cmd(&horizon, mouthful, is_horizon_lengthenable, true) {
|
||||
CommonStrCmdResult::None => {},
|
||||
CommonStrCmdResult::Err(e) => { return Err(e); },
|
||||
@ -74,7 +75,6 @@ impl Situation for SitStrPhantom {
|
||||
}
|
||||
|
||||
fn is_phantomstringfood(c: u8) -> bool {
|
||||
c >= b'+'
|
||||
&& c != b';' && c != b'<' && c != b'>'
|
||||
&& c != b'\\' && c != b'`' && c != b'|'
|
||||
c >= b'+' && is_word(c)
|
||||
&& c != b'?' && c != b'\\'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user