Skip to content

Commit 0ba042c

Browse files
committed
Add --help to show available options
1 parent 5aead5d commit 0ba042c

File tree

4 files changed

+79
-3
lines changed

4 files changed

+79
-3
lines changed

scripts/java/shell.cmd

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,29 @@
11
@echo off
22
setlocal
33

4+
REM Check for help flag
5+
if "%~1"=="--help" goto show_help
6+
if "%~1"=="-h" goto show_help
7+
48
set AGENT_APPLICATION=..\..\examples-java
59

610
call ..\support\shell_template.bat %*
711

8-
endlocal
12+
endlocal
13+
exit /b 0
14+
15+
:show_help
16+
echo.
17+
echo Java Agent Shell - Available Options:
18+
echo.
19+
echo --help, -h Show this help message
20+
echo --observability Enable observability features (Zipkin tracing)
21+
echo --no-docker-tools Disable Docker tool integration (basic features only)
22+
echo.
23+
echo Examples:
24+
echo shell.cmd
25+
echo shell.cmd --observability
26+
echo shell.cmd --observability --no-docker-tools
27+
echo.
28+
exit /b 0
29+
endlocal

scripts/java/shell.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,22 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
66
# Set the path relative to this script's directory
77
export AGENT_APPLICATION="$SCRIPT_DIR/../../examples-java"
88

9+
# Check for help flag
10+
if [[ "$1" == "--help" || "$1" == "-h" ]]; then
11+
echo
12+
echo "Java Agent Shell - Available Options:"
13+
echo
14+
echo " --help, -h Show this help message"
15+
echo " --observability Enable observability features (Zipkin tracing)"
16+
echo " --no-docker-tools Disable Docker tool integration (basic features only)"
17+
echo
18+
echo "Examples:"
19+
echo " ./shell.sh"
20+
echo " ./shell.sh --observability"
21+
echo " ./shell.sh --observability --no-docker-tools"
22+
echo
23+
exit 0
24+
fi
25+
926
# Call the shell_template.sh relative to this script's location
1027
"$SCRIPT_DIR/../support/shell_template.sh" "$@"

scripts/kotlin/shell.cmd

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,29 @@
11
@echo off
22
setlocal
33

4+
REM Check for help flag
5+
if "%~1"=="--help" goto show_help
6+
if "%~1"=="-h" goto show_help
7+
48
set AGENT_APPLICATION=..\..\examples-kotlin
59

610
call ..\support\shell_template.bat %*
711

8-
endlocal
12+
endlocal
13+
exit /b 0
14+
15+
:show_help
16+
echo.
17+
echo Kotlin Agent Shell - Available Options:
18+
echo.
19+
echo --help, -h Show this help message
20+
echo --observability Enable observability features (Zipkin tracing)
21+
echo --no-docker-tools Disable Docker tool integration (basic features only)
22+
echo.
23+
echo Examples:
24+
echo shell.cmd
25+
echo shell.cmd --observability
26+
echo shell.cmd --observability --no-docker-tools
27+
echo.
28+
exit /b 0
29+
endlocal

scripts/kotlin/shell.sh

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,22 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
66
# Set the path relative to this script's directory
77
export AGENT_APPLICATION="$SCRIPT_DIR/../../examples-kotlin"
88

9+
# Check for help flag
10+
if [[ "$1" == "--help" || "$1" == "-h" ]]; then
11+
echo
12+
echo "Kotlin Agent Shell - Available Options:"
13+
echo
14+
echo " --help, -h Show this help message"
15+
echo " --observability Enable observability features (Zipkin tracing)"
16+
echo " --no-docker-tools Disable Docker tool integration (basic features only)"
17+
echo
18+
echo "Examples:"
19+
echo " ./shell.sh"
20+
echo " ./shell.sh --observability"
21+
echo " ./shell.sh --observability --no-docker-tools"
22+
echo
23+
exit 0
24+
fi
25+
926
# Call the shell_template.sh relative to this script's location
10-
"$SCRIPT_DIR/../support/shell_template.sh" "$@"
27+
"$SCRIPT_DIR/../support/shell_template.sh" "$@"

0 commit comments

Comments
 (0)