diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-12-20 18:10:08 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-12-20 18:10:08 -0800 |
commit | 2a91a7640cfb8a6caadfd096d6e6975cdc56aacb (patch) | |
tree | 6c02ef9c0dca12202445a71de9b9ca950c2d409f /builtin.cpp | |
parent | 6b352500992692c0dcd978fb6e7569bfc93ddb4f (diff) |
Make echo recognize -ne
Diffstat (limited to 'builtin.cpp')
-rw-r--r-- | builtin.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/builtin.cpp b/builtin.cpp index 88022c04..ae587e18 100644 --- a/builtin.cpp +++ b/builtin.cpp @@ -1595,14 +1595,20 @@ static int builtin_echo(parser_t &parser, wchar_t **argv) { print_newline = false; } - else if (! wcscmp(*argv, L"-s")) + else if (! wcscmp(*argv, L"-e")) { - print_spaces = false; + interpret_special_chars = true; } - else if (! wcscmp(*argv, L"-e")) + else if (! wcscmp(*argv, L"-ne")) { + print_newline = false; interpret_special_chars = true; } + else if (! wcscmp(*argv, L"-s")) + { + // fish-specific extension, which we should try to nix + print_spaces = false; + } else if (! wcscmp(*argv, L"-E")) { interpret_special_chars = false; |