Commits

JanKanis committed e1ca4df Merge

Merge branch 'master' of git://github.com/fish-shell/fish-shell

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;
 
     }
 
-    pipe_read.fd=0;
-    pipe_write.fd=1;
-    pipe_read.io_mode=IO_PIPE;
-    pipe_read.param1.pipe_fd[0] = -1;
-    pipe_read.param1.pipe_fd[1] = -1;
+    pipe_read.fd = 0;
+    pipe_read.io_mode = IO_PIPE;
     pipe_read.is_input = 1;
+    pipe_read.param1.pipe_fd[0] = pipe_read.param1.pipe_fd[1] = -1;
 
-    pipe_write.io_mode=IO_PIPE;
+    pipe_write.fd = 1;
+    pipe_write.io_mode = IO_PIPE;
     pipe_write.is_input = 0;
-    pipe_write.param1.pipe_fd[0]=pipe_write.param1.pipe_fd[1]=-1;
+    pipe_write.param1.pipe_fd[0] = pipe_write.param1.pipe_fd[1] = -1;
 
     j->io.push_back(&pipe_write);
 
 
             case INTERNAL_BUILTIN:
             {
-                int skip_fork;
+                bool skip_fork;
 
                 /*
                   Handle output from builtin commands. In the general
                 {
                     const std::string res = wcs2string(get_stdout_buffer());
                     io->out_buffer_append(res.c_str(), res.size());
-                    skip_fork = 1;
+                    skip_fork = true;
                 }
 
                 if (! skip_fork && j->io.empty())
                     const std::string outbuff = wcs2string(out);
                     const std::string errbuff = wcs2string(err);
                     do_builtin_io(outbuff.data(), outbuff.size(), errbuff.data(), errbuff.size());
-                    skip_fork = 1;
+                    skip_fork = true;
                 }
 
                 for (io_chain_t::iterator iter = j->io.begin(); iter != j->io.end(); iter++)
                     io_data_t *tmp_io = *iter;
                     if (tmp_io->io_mode == IO_FILE && strcmp(tmp_io->filename_cstr, "/dev/null") != 0)
                     {
-                        skip_fork = 0;
+                        skip_fork = false;
                         break;
                     }
                 }
         {
             // 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);