aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/world/shell.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-09-12 15:39:55 -0400
committerEduardo Julian2021-09-12 15:39:55 -0400
commit2dbbaaec93a53f8dd0b96a0028b9cf125c9066cd (patch)
tree14bc8b5abe09b46ef005c3ff7cf132f1d98ddf0d /stdlib/source/library/lux/world/shell.lux
parentdda05bca0956af5e5b3875c4cc36e61aa04772e4 (diff)
Re-named \ => # && \\ => ##
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/world/shell.lux28
1 files changed, 14 insertions, 14 deletions
diff --git a/stdlib/source/library/lux/world/shell.lux b/stdlib/source/library/lux/world/shell.lux
index 29ff3ab2e..c195cb24a 100644
--- a/stdlib/source/library/lux/world/shell.lux
+++ b/stdlib/source/library/lux/world/shell.lux
@@ -25,7 +25,7 @@
["[0]" utf8]]]
[collection
["[0]" array {"+" [Array]}]
- ["[0]" list ("[1]\[0]" mix functor)]
+ ["[0]" list ("[1]#[0]" mix functor)]
["[0]" dictionary]]]
[math
[number {"+" [hex]}
@@ -63,7 +63,7 @@
(`` (implementation
(~~ (template [<method>]
[(def: <method>
- (|>> (\ process <method>)
+ (|>> (# process <method>)
async.future))]
[read]
@@ -90,7 +90,7 @@
(def: (execute input)
(async.future
(do (try.with io.monad)
- [process (\ shell execute input)]
+ [process (# shell execute input)]
(in (..async_process process)))))))
... https://en.wikipedia.org/wiki/Code_injection#Shell_injection
@@ -177,7 +177,7 @@
(def: (jvm::arguments_array arguments)
(-> (List Argument) (Array java/lang/String))
(product.right
- (list\mix (function (_ argument [idx output])
+ (list#mix (function (_ argument [idx output])
[(++ idx) (jvm.write! idx
(:as java/lang/String argument)
output)])
@@ -192,7 +192,7 @@
(-> Environment
(java/util/Map java/lang/String java/lang/String)
(java/util/Map java/lang/String java/lang/String))
- (list\mix (function (_ [key value] target')
+ (list#mix (function (_ [key value] target')
(exec
(java/util/Map::put (:as java/lang/String key)
(:as java/lang/String value)
@@ -253,13 +253,13 @@
(in output)
{.#None}
- (\ io.monad in (exception.except ..no_more_output [])))))]
+ (# io.monad in (exception.except ..no_more_output [])))))]
[read jvm_input]
[fail jvm_error]
))
(def: (write message)
- (java/io/OutputStream::write (\ utf8.codec encoded message) jvm_output))
+ (java/io/OutputStream::write (# utf8.codec encoded message) jvm_output))
(~~ (template [<name> <method>]
[(def: (<name> _)
(<method> process))]
@@ -286,7 +286,7 @@
... https://en.wikipedia.org/wiki/Code_injection#Shell_injection
(def: windows?
(IO (Try Bit))
- (\ (try.with io.monad) each
+ (# (try.with io.monad) each
(|>> java/lang/String::toLowerCase (text.starts_with? "windows"))
(java/lang/System::getProperty "os.name")))
@@ -301,8 +301,8 @@
(java/lang/ProcessBuilder::directory (java/io/File::new working_directory)))]
_ (|> builder
java/lang/ProcessBuilder::environment
- (\ try.functor each (..jvm::load_environment environment))
- (\ io.monad in))
+ (# try.functor each (..jvm::load_environment environment))
+ (# io.monad in))
process (java/lang/ProcessBuilder::start builder)]
(..default_process process))))
)]
@@ -330,7 +330,7 @@
[(def: (<name> _)
(do [! io.monad]
[|state| (atom.read! state)]
- (case (\ mock <mock> |state|)
+ (case (# mock <mock> |state|)
{try.#Success [|state| output]}
(do !
[_ (atom.write! |state| state)]
@@ -346,7 +346,7 @@
(def: (write message)
(do [! io.monad]
[|state| (atom.read! state)]
- (case (\ mock on_write message |state|)
+ (case (# mock on_write message |state|)
{try.#Success |state|}
(do !
[_ (atom.write! |state| state)]
@@ -357,7 +357,7 @@
(def: (destroy _)
(do [! io.monad]
[|state| (atom.read! state)]
- (case (\ mock on_destroy |state|)
+ (case (# mock on_destroy |state|)
{try.#Success |state|}
(do !
[_ (atom.write! |state| state)]
@@ -375,5 +375,5 @@
(def: execute
(|>> mock
- (\ try.monad each (..mock_process (atom.atom init)))
+ (# try.monad each (..mock_process (atom.atom init)))
io.io)))