Mercurial > hg > octave-lyh
changeset 13898:19e11eb17812
quote filenames passed to the shell
* ls.m: Quote filenames passed to the shell.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 21 Nov 2011 03:16:39 -0500 |
parents | 1367f2db49a2 |
children | 764d2bc59a6f |
files | scripts/miscellaneous/ls.m |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/miscellaneous/ls.m +++ b/scripts/miscellaneous/ls.m @@ -50,7 +50,10 @@ args = tilde_expand (varargin); - cmd = sprintf ("%s ", __ls_command__, args{:}); + ## FIXME -- this will fail for filenames that contain single quote + ## characters... + cmd = sprintf (" '%s'", args{:}); + cmd = sprintf ("%s%s", __ls_command__, cmd); if (page_screen_output () || nargout > 0)