add exit command
This commit is contained in:
11
uash.ua
11
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₁
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user