[latex3-commits] [git/LaTeX3-latex3-latex3] master: Update sys-shell functions (6b37019)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Jan 16 19:15:31 CET 2019


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/6b370199158f5aab5d66e13b05a11cf5affcdd18

>---------------------------------------------------------------

commit 6b370199158f5aab5d66e13b05a11cf5affcdd18
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Jan 16 18:15:31 2019 +0000

    Update sys-shell functions


>---------------------------------------------------------------

6b370199158f5aab5d66e13b05a11cf5affcdd18
 l3experimental/l3sys-shell/l3sys-shell.dtx |   22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/l3experimental/l3sys-shell/l3sys-shell.dtx b/l3experimental/l3sys-shell/l3sys-shell.dtx
index d28febe..155d3ce 100644
--- a/l3experimental/l3sys-shell/l3sys-shell.dtx
+++ b/l3experimental/l3sys-shell/l3sys-shell.dtx
@@ -310,7 +310,11 @@
   {
     \sys_if_shell_unrestricted:T
       {
-        \exp_not:N \tl_set_from_shell:Nnn \exp_not:N \l_@@_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 \#
@@ -318,10 +322,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_@@_tmp_tl
         \str_set:NV #1 \exp_not:N \l_@@_tmp_tl
       }
   }
@@ -338,7 +339,11 @@
   {
     \sys_if_shell_unrestricted:T
       {
-        \exp_not:N \tl_set_from_shell:Nnn \exp_not:N \l_@@_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 \\
@@ -347,10 +352,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_@@_tmp_tl
         \str_set:NV \exp_not:N \l_@@_tmp_tl \exp_not:N \l_@@_tmp_tl
         \seq_set_split:NnV #2 { \char_generate:nn { `\^^M } { 12 } }
           \exp_not:N \l_@@_tmp_tl





More information about the latex3-commits mailing list