Serenity Operating System
1#!/bin/Shell
2
3__proxy() {
4 echo '{"kind":"proxy","argv":"'"${regex_replace '"' '\"' "$*"}"'"}'
5}
6
7# Builtins
8_complete_time() {
9 shift 2
10 argsparser_parse \
11 --add-option _ --help-string "Number of iterations" \
12 --long-name iterations --short-name n --value-name iterations --type u32 \
13 --add-positional-argument argv --help-string _ \
14 --value-name _ --min 0 --max 9999999 \
15 --stop-on-first-non-option \
16 -- $*
17 __proxy $argv
18}
19
20# Utilities
21_complete_pls() {
22 shift 2
23 argsparser_parse \
24 --add-option _ --help-string "User to execute as" --short-name u --value-name UID \
25 --add-positional-argument argv --help-string "Command to run at elevated privilege level" \
26 --value-name command --min 0 --max 999999 \
27 --stop-on-first-non-option \
28 -- $*
29 __proxy $argv
30}