diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty b/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty index 87b1b13a41c..6839781c44f 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty @@ -6,7 +6,7 @@ %% %% l3sys-shell.dtx (with options: `package') %% -%% Copyright (C) 2018 The LaTeX3 Project +%% Copyright (C) 2018,2019 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -18,9 +18,9 @@ %% This file is part of the "l3experimental bundle" (The Work in LPPL) %% and all files in that bundle must be distributed together. %% -%% File: l3sys-shell.dtx Copyright(C) 2018 The LaTeX3 Project +%% File: l3sys-shell.dtx \RequirePackage{expl3} -\ProvidesExplPackage{l3sys-shell}{2018-11-19}{} +\ProvidesExplPackage{l3sys-shell}{2019-01-28}{} {L3 Experimental system shell functions} \cs_new:Npn \__sys_path_to_win:n #1 { @@ -134,7 +134,11 @@ { \sys_if_shell_unrestricted:T { - \exp_not:N \tl_set_from_shell:Nnn \exp_not:N \l__sys_tmp_tl + \exp_not:N \sys_shell_get:nnN + { + \sys_if_platform_unix:T { pwd } + \sys_if_platform_windows:T { cd } + } { \char_set_catcode_other:N \exp_not:N \\ \char_set_catcode_other:N \exp_not:N \# @@ -142,10 +146,7 @@ \char_set_catcode_other:N \exp_not:N \% \char_set_catcode_space:N \exp_not:N \ % } - { - \sys_if_platform_unix:T { pwd } - \sys_if_platform_windows:T { cd } - } + \exp_not:N \l__sys_tmp_tl \str_set:NV #1 \exp_not:N \l__sys_tmp_tl } } @@ -153,7 +154,11 @@ { \sys_if_shell_unrestricted:T { - \exp_not:N \tl_set_from_shell:Nnn \exp_not:N \l__sys_tmp_tl + \exp_not:N \sys_shell_get:nnN + { + \sys_if_platform_unix:T { ls~-1~ #1 } + \sys_if_platform_windows:T { dir~/b~ #1 } + } { \ExplSyntaxOff \char_set_catcode_other:N \exp_not:N \\ @@ -162,10 +167,7 @@ \char_set_catcode_other:N \exp_not:N \% \char_set_catcode_other:n { 13 } } - { - \sys_if_platform_unix:T { ls~-1~ #1 } - \sys_if_platform_windows:T { dir~/b~ #1 } - } + \exp_not:N \l__sys_tmp_tl \str_set:NV \exp_not:N \l__sys_tmp_tl \exp_not:N \l__sys_tmp_tl \seq_set_split:NnV #2 { \char_generate:nn { `\^^M } { 12 } } \exp_not:N \l__sys_tmp_tl |