# HG changeset patch # User Lachlan Andrew # Date 1444444168 25200 # Node ID 56333f6df8234903402c6856d586e7fbf670b62b # Parent 5fc798a9b32cc020f57ec9e4d1ac7df4bf1a8688 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 HG: branch 'default' * ls.m: Add '-1' to arguments on non-PC platforms so that file listing is one per line. diff -r 5fc798a9b32c -r 56333f6df823 scripts/miscellaneous/ls.m --- a/scripts/miscellaneous/ls.m Fri Oct 09 19:28:05 2015 -0700 +++ b/scripts/miscellaneous/ls.m Fri Oct 09 19:29:28 2015 -0700 @@ -86,6 +86,10 @@ args = ""; endif + if (nargout > 0 && (isunix () || ismac ())) + args = ["-1 ", args]; + endif + cmd = [__ls_command__ " " args]; if (page_screen_output () || nargout > 0)