Commits

Anonymous committed 2a91a76

Make echo recognize -ne

Comments (0)

Files changed (2)

         {
             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;
         {
             // Look for the next separator
             const char *stop = (const char *)memchr(cursor, sep, end - cursor);
-            bool hit_separator = (stop != NULL);
+            const bool hit_separator = (stop != NULL);
             if (! hit_separator)
             {
                 // If it's not found, just use the end
                 stop = end;
             }
-            // Stop now points at the first character we do not want to copy)
+            // Stop now points at the first character we do not want to copy
             const wcstring wc = str2wcstring(cursor, stop - cursor);
             lst->push_back(wc);
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.