diff options
Diffstat (limited to 'main/augeas/0009-Shellvars-add-eval-builtin-support.patch')
-rw-r--r-- | main/augeas/0009-Shellvars-add-eval-builtin-support.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/main/augeas/0009-Shellvars-add-eval-builtin-support.patch b/main/augeas/0009-Shellvars-add-eval-builtin-support.patch new file mode 100644 index 0000000000..71f9b73946 --- /dev/null +++ b/main/augeas/0009-Shellvars-add-eval-builtin-support.patch @@ -0,0 +1,59 @@ +From c0ceda2cbc93add3392e87a488947691a886af78 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= <raphael.pinson@camptocamp.com> +Date: Thu, 30 Jul 2015 09:16:12 +0200 +Subject: [PATCH 09/19] Shellvars: add eval builtin support + +--- + lenses/shellvars.aug | 6 ++++++ + lenses/tests/test_shellvars.aug | 4 ++++ + 2 files changed, 10 insertions(+) + +diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug +index dc6d4f3..8735d77 100644 +--- a/lenses/shellvars.aug ++++ b/lenses/shellvars.aug +@@ -83,6 +83,10 @@ module Shellvars = + + let shell_builtin_cmds = "ulimit" | "shift" | "exit" + ++ let eval = ++ Util.indent . Util.del_str "eval" . Util.del_ws_spc ++ . label "@eval" . store anyquot ++ + let builtin = + Util.indent . label "@builtin" + . store shell_builtin_cmds +@@ -169,6 +173,7 @@ module Shellvars = + | entry_eol_item builtin + | entry_eol_item return + | entry_eol_item condition ++ | entry_eol_item eval + + let entry_noeol = + let entry_item (item:lens) = [ item ] in +@@ -179,6 +184,7 @@ module Shellvars = + | entry_item builtin + | entry_item return + | entry_item condition ++ | entry_item eval + + let rec rec_entry = + let entry = comment | entry_eol | rec_entry in +diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug +index 9484754..9d301af 100644 +--- a/lenses/tests/test_shellvars.aug ++++ b/lenses/tests/test_shellvars.aug +@@ -580,6 +580,10 @@ esac\n" = + } + } + ++ (* eval *) ++ test lns get "eval `dircolors`\n" = ++ { "@eval" = "`dircolors`" } ++ + (* Local Variables: *) + (* mode: caml *) + (* End: *) +-- +2.5.0 + |