- Updated `task`, `task.template`, and `library.md` to use angle brackets (`<param>`) for required parameters and square brackets (`[param]`) for optional ones. - Fixed argument order mismatches in `create-symlink`, `create-symlink-files`, and `commit-git-folder` documentation. - Removed non-existent `[path]` parameter from `merge-git-remote`. - Standardized empty-argument error messages across `bin/*` scripts to use slash notation (e.g., `$1/path is empty.`). - Updated prompt file `prompts/21_show-optional-and-required-params-in-task-help.md` to mark task as completed and log work.
17 lines
456 B
Bash
Executable File
17 lines
456 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
show-dotenv() {
|
|
if [[ -z "$1" ]]; then echo "\$1/env is empty."; exit; fi
|
|
TASK_DOTENV_DIR=${TASK_DOTENV_DIR:="$HOME/.config/taskfile.build"}
|
|
|
|
local env_filepath="$TASK_DOTENV_DIR/.env.$1"
|
|
if [[ ! -f "$env_filepath" ]]; then
|
|
echo "Environment '$1' not found."
|
|
return 1 # Exit with non-zero status if file does not exist
|
|
fi
|
|
cat "$env_filepath" | sed 's/^/export /'
|
|
}
|
|
sd() {
|
|
show-dotenv "$@"
|
|
}
|