Skip to content

Commit

Permalink
escape: comments
Browse files Browse the repository at this point in the history
  • Loading branch information
trou committed Oct 25, 2024
1 parent e17c95f commit e30e1fb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/escapeapp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ enum EscType {
}

const SHELL_CHARS: &[u8; 4] = b"`$\"\\";
// Note that bash is crazy regarding '!'
// echo "\!" will output \!
// ref: https://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html
// > If enabled, history expansion will be performed unless an ‘!’ appearing in double quotes is
// > escaped using a backslash. The backslash preceding the ‘!’ is not removed.
const BASH_CHARS: &[u8; 5] = b"`$\"\\!";

trait SliceEsc {
Expand Down

0 comments on commit e30e1fb

Please sign in to comment.