From ef43b22a8e6d4eb7388a552ba6d52d662e38fd0c Mon Sep 17 00:00:00 2001 From: sigoden Date: Tue, 21 May 2024 08:26:47 +0800 Subject: feat: rewrite to accept json data from cli args other than env var (#7) * update readme --- sh/get_current_time.sh | 11 +++++++++++ sh/may_execute_command.sh | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 sh/get_current_time.sh (limited to 'sh') diff --git a/sh/get_current_time.sh b/sh/get_current_time.sh new file mode 100755 index 0000000..26a25d8 --- /dev/null +++ b/sh/get_current_time.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +set -e + +# @describe Get the current time. + +main() { + date +} + +eval "$(argc --argc-eval "$0" "$@")" + diff --git a/sh/may_execute_command.sh b/sh/may_execute_command.sh index 90db52b..5aad4a3 100755 --- a/sh/may_execute_command.sh +++ b/sh/may_execute_command.sh @@ -2,7 +2,7 @@ set -e # @describe Executes a shell command. -# @option --command~ Command to execute, such as `ls -la` +# @option --command! Command to execute, such as `ls -la` main() { eval "$argc_command" -- cgit v1.2.3