Mercurial > octave-nkf
comparison scripts/miscellaneous/ls.m @ 20627:56333f6df823
ls.m: Produce listing with 1 file per line if nargout > 0 (bug #46002).
HG: Enter commit message. Lines beginning with 'HG:' are removed.
HG: Leave message empty to abort commit.
HG: --
HG: user: Lachlan Andrew <lachlanbis@gmail.com>
HG: branch 'default'
* ls.m: Add '-1' to arguments on non-PC platforms so that file listing is one
per line.
author | Lachlan Andrew <lachlanbis@gmail.com> |
---|---|
date | Fri, 09 Oct 2015 19:29:28 -0700 |
parents | 4197fc428c7d |
children |
comparison
equal
deleted
inserted
replaced
20626:5fc798a9b32c | 20627:56333f6df823 |
---|---|
84 args = sprintf ("%s ", args{:}); | 84 args = sprintf ("%s ", args{:}); |
85 else | 85 else |
86 args = ""; | 86 args = ""; |
87 endif | 87 endif |
88 | 88 |
89 if (nargout > 0 && (isunix () || ismac ())) | |
90 args = ["-1 ", args]; | |
91 endif | |
92 | |
89 cmd = [__ls_command__ " " args]; | 93 cmd = [__ls_command__ " " args]; |
90 | 94 |
91 if (page_screen_output () || nargout > 0) | 95 if (page_screen_output () || nargout > 0) |
92 [status, output] = system (cmd); | 96 [status, output] = system (cmd); |
93 | 97 |