-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
main
31 lines (24 loc) · 888 Bytes
/
main
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# shellcheck shell=dash
x log init nu
xrc:mod:lib nu __setup ddgo __binexec
___x_cmd_nu___main(){
[ "$#" -gt 0 ] || {
___x_cmd_nu___binexec nu
return
}
local op="$1"; shift
case "$op" in
-h|--help) ___x_cmd help -m nu "$@" ;;
:|ddgo) ___x_cmd_nu_ddgo "$@" ;;
setup|--setup) ___x_cmd_nu___setup "$@" ;;
--sysco) ___x_cmd_nu___sysco "$@" ;;
# <inner function>
--binexec) ___x_cmd_nu___binexec "$op" "$@" ;;
--exec) ___x_cmd_nu___binexec nu "$@" ;;
# <inner function>
*) ___x_cmd_nu___binexec nu "$op" "$@" ;;
esac
}
___x_cmd_nu___sysco(){
___X_CMD_CO_EXEC_SHELL=nushell ___x_cmd co --exec "$@"
}