diff --git a/uash.ua b/uash.ua index d522853..b0ad8a8 100755 --- a/uash.ua +++ b/uash.ua @@ -27,6 +27,14 @@ | &ep"cd: too many arguments") ) + # ? {"exit" [code]} + Exit ← ( + ⨂[0 1]⊸⧻ ↘1 + ⨬(&exit 0 + | &exit ⋕°□⊢ + | &ep"exit: too many arguments") + ) + Otherwise ← ( ⍣(°0&runi|&ep⊂"failed to run " /◇$"_ _") ) @@ -35,8 +43,9 @@ ┌─╴Main F ← |1.0 ( ⊜□⊸≠@\s - ⨂{"cd"}⊸⍣⊢"" + ⨂{"cd" "exit"}⊸⍣⊢"" ⨬(Commands~CD + | Commands~Exit | Commands~Otherwise) CommandLine~PS₁ )