feat: standardize required/optional param notation and update error messages
- 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.
This commit is contained in:
23 files changed
+124
-126
No files matched your search
+42
-42
@@ -11,37 +11,37 @@ help-table() {
|
||||
rows+=("init-project||Setup a taskfile project in the current directory.")
|
||||
rows+=("init-dotenv-dir||Setup task dotenv dir.")
|
||||
rows+=("template-dotenv||Generate .env from .env.template.")
|
||||
rows+=("open-with-os||Open file or url with default application.")
|
||||
rows+=("open-url|[url]|Open url.")
|
||||
rows+=("open-with-os|<path>|Open file or url with default application.")
|
||||
rows+=("open-url|<url>|Open url.")
|
||||
rows+=("show-dotenv-setup||Show info about the dotenv setup.")
|
||||
rows+=("setup-completion|[shell]|Show shell completion instructions.")
|
||||
rows+=("list-taskfile-aliases||List all library command aliases.")
|
||||
rows+=("===Files===| | ")
|
||||
rows+=("ensure-directory|[path]|Ensure directory path exists.")
|
||||
rows+=("create-symlink|[target][source]|Remove existing file/directory and create symlink.")
|
||||
rows+=("create-symlink-files|[target][source]|Create symlink for files in source pattern.")
|
||||
rows+=("ensure-directory|<path>|Ensure directory path exists.")
|
||||
rows+=("create-symlink|<source><target>|Remove existing file/directory and create symlink.")
|
||||
rows+=("create-symlink-files|<source><target>|Create symlink for files in source pattern.")
|
||||
rows+=("===Python===| | ")
|
||||
rows+=("activate-venv||Activate or initialize Python virtual env.")
|
||||
rows+=("remove-venv||Remove the Python virtual env.")
|
||||
rows+=("===Jupyter===| | ")
|
||||
rows+=("start-jupyter-lab|[env]|Start Jupyter Lab server.")
|
||||
rows+=("install-jupyter-lab||Install Jupyter Lab and dependencies.")
|
||||
rows+=("run-jupyter-notebook|[path][env]|Execute notebook with papermill.")
|
||||
rows+=("run-jupyter-notebook|<path>[env]|Execute notebook with papermill.")
|
||||
rows+=("===Environment===| | ")
|
||||
rows+=("create-dotenv|[env][type]|Create .env file of type nextcloud, odoo, upgrade.")
|
||||
rows+=("create-dotenv|<env><type>|Create .env file of type nextcloud, odoo, upgrade.")
|
||||
rows+=("list-dotenv||List dotenv files.")
|
||||
rows+=("show-dotenv|[env]|Output content of the .env file.")
|
||||
rows+=("copy-dotenv|[env][env]|Copy .env file.")
|
||||
rows+=("edit-dotenv|[env]|Open .env file in default editor.")
|
||||
rows+=("load-dotenv|[env]|Load and export .env file.")
|
||||
rows+=("rename-dotenv|[env][env]|Rename .env file.")
|
||||
rows+=("remove-dotenv|[env]|Remove .env file.")
|
||||
rows+=("backup-dotenv-files|[path]|Archive and copy .env files to target location.")
|
||||
rows+=("restore-dotenv-files|[path]|Extract and copy .env files from backup file.")
|
||||
rows+=("show-dotenv|<env>|Output content of the .env file.")
|
||||
rows+=("copy-dotenv|<env><env>|Copy .env file.")
|
||||
rows+=("edit-dotenv|<env>|Open .env file in default editor.")
|
||||
rows+=("load-dotenv|<env>|Load and export .env file.")
|
||||
rows+=("rename-dotenv|<env><env>|Rename .env file.")
|
||||
rows+=("remove-dotenv|<env>|Remove .env file.")
|
||||
rows+=("backup-dotenv-files|<path>|Archive and copy .env files to target location.")
|
||||
rows+=("restore-dotenv-files|<path>|Extract and copy .env files from backup file.")
|
||||
rows+=("===LLM===| | ")
|
||||
rows+=("commit-with-llm||Commit with llm generated commit message.")
|
||||
rows+=("update-with-llm|[glob][prompt]|Feed files matching glob to LLM and apply changes.")
|
||||
rows+=("update-changelog-with-llm||Update CHANGELOG.md with changes from staged git diff using LLM.")
|
||||
rows+=("update-with-llm|<glob><prompt>|Feed files matching glob to LLM and apply changes.")
|
||||
rows+=("update-changelog-with-llm|[num_lines]|Update CHANGELOG.md with changes from staged git diff using LLM.")
|
||||
rows+=("create-prompt||Create a new prompt file from template.")
|
||||
rows+=("list-prompts|[path]|List all prompt files.")
|
||||
rows+=("===Logging===| | ")
|
||||
@@ -49,37 +49,37 @@ help-table() {
|
||||
rows+=("log-success||Colored output for success.")
|
||||
rows+=("log-warning||Colored output for warnings.")
|
||||
rows+=("===Git===| | ")
|
||||
rows+=("add-git-folder|[url][branch][path]|Add git folder to .gitmodules.")
|
||||
rows+=("add-git-merge|[remote][branch][path]|Add git merge ref to gitmodules.")
|
||||
rows+=("add-git-remote|[remote][url][path]|Add git remote to git folder.")
|
||||
rows+=("aggregate-git-folders|[path]|Run gitaggregate for the repos.yaml.")
|
||||
rows+=("commit-git-folder|[message][path]|Commit all changes in git folders in path.")
|
||||
rows+=("clean-git-folder|[path]|Clean git folder.")
|
||||
rows+=("checkout-git-folder|[branch][path]|Checkout git commit from .gitmodules files.")
|
||||
rows+=("clone-git-folder|[path]|Clone git folder from .gitmodules file.")
|
||||
rows+=("download-git-folder|[path]|Download git folder from .gitmodules file.")
|
||||
rows+=("find-git-folder|[path]|Find all .git folders in path.")
|
||||
rows+=("add-git-folder|<url><branch><path>|Add git folder to .gitmodules.")
|
||||
rows+=("add-git-merge|<remote><merge><path>|Add git merge ref to gitmodules.")
|
||||
rows+=("add-git-remote|<remote><url><path>|Add git remote to git folder.")
|
||||
rows+=("aggregate-git-folders|<path>|Run gitaggregate for the repos.yaml.")
|
||||
rows+=("commit-git-folder|<path><message>|Commit all changes in git folders in path.")
|
||||
rows+=("clean-git-folder|<path>|Clean git folder.")
|
||||
rows+=("checkout-git-folder|<branch><path>|Checkout git commit from .gitmodules files.")
|
||||
rows+=("clone-git-folder|<path>|Clone git folder from .gitmodules file.")
|
||||
rows+=("download-git-folder|<path>|Download git folder from .gitmodules file.")
|
||||
rows+=("find-git-folder|<path>|Find all .git folders in path.")
|
||||
rows+=("generate-ssh-key||Generate ssh key pair.")
|
||||
rows+=("list-git-folder|[path]|List path and url of git folders from .gitmodules file.")
|
||||
rows+=("ls-git-folder|[path]|Space separated list of git folders in path.")
|
||||
rows+=("merge-git-remote|[path]|Merge all remotes and refs defined in .gitmodules.")
|
||||
rows+=("pull-git-folder|[branch][path]|Pull all git folders from .gitmodules file.")
|
||||
rows+=("switch-git-folder|[branch][path]|Switch branch for all git folders from .gitmodules file.")
|
||||
rows+=("sync-git-folder|[branch][path]|Switch, stash and pull all git folders from .gitmodules file.")
|
||||
rows+=("remove-git-folder|[path]|Remove git folders in path from .gitmodules file.")
|
||||
rows+=("push-git-folder|[path]|Push all git folders in path.")
|
||||
rows+=("reset-git-folder|[path]|Abort, rebase and reset git folder.")
|
||||
rows+=("run-pre-commit|[path]|Run pre-commit in path.")
|
||||
rows+=("list-git-folder|<path>|List path and url of git folders from .gitmodules file.")
|
||||
rows+=("ls-git-folder|<path>|Space separated list of git folders from .gitmodules file.")
|
||||
rows+=("merge-git-remote||Merge all remotes and refs defined in .gitmodules.")
|
||||
rows+=("pull-git-folder|<branch><path>|Pull all git folders from .gitmodules file.")
|
||||
rows+=("switch-git-folder|<branch><path>|Switch branch for all git folders from .gitmodules file.")
|
||||
rows+=("sync-git-folder|<branch><path>|Switch, stash and pull all git folders from .gitmodules file.")
|
||||
rows+=("remove-git-folder|<path>|Remove git folders in path from .gitmodules file.")
|
||||
rows+=("push-git-folder|<path>|Push all git folders in path.")
|
||||
rows+=("reset-git-folder|<path>|Abort, rebase and reset git folders from .gitmodules file.")
|
||||
rows+=("run-pre-commit|<path>|Run pre-commit in path.")
|
||||
rows+=("save-git-folder||Save commit refs to .gitmodules.")
|
||||
rows+=("stage-git-folder|[path]|Stage all files in git folders in path.")
|
||||
rows+=("status-git-folder|[path]|Show status of git folders in path.")
|
||||
rows+=("stage-git-folder|<path>|Stage all files in git folders in path.")
|
||||
rows+=("status-git-folder|<path>|Show status of git folders in path.")
|
||||
rows+=("update-submodule||Update git submodules.")
|
||||
rows+=("===Pass===| | ")
|
||||
rows+=("save-dotenv-to-pass|[file]|Store content of .env in pass entry.")
|
||||
rows+=("load-dotenv-from-pass|[file]|Restore content to .env from pass entry.")
|
||||
rows+=("===KeePass===| | ")
|
||||
rows+=("save-pass-to-keepass|[pass][entry]|Store password to KeePass entry.")
|
||||
rows+=("get-pass-from-keepass|[entry]|Get password from KeePass entry.")
|
||||
rows+=("save-pass-to-keepass|<pass><entry>|Store password to KeePass entry.")
|
||||
rows+=("get-pass-from-keepass|<entry>|Get password from KeePass entry.")
|
||||
rows+=("save-dotenv-to-keepass|[file]|Store content of .env in KeePass entry.")
|
||||
rows+=("load-dotenv-from-keepass|[file]|Restore content to .env from KeePass entry.")
|
||||
rows+=("===Kubernetes===| | ")
|
||||
@@ -91,7 +91,7 @@ help-table() {
|
||||
rows+=("login-docker|[user][token]|Run Docker login and create docker config.")
|
||||
rows+=("build-image|[output]|Build Docker image with buildx.")
|
||||
rows+=("===Ansible===| | ")
|
||||
rows+=("install-ansible-build-scripts|[role]|Install scripts of the specified Ansbile role.")
|
||||
rows+=("install-ansible-build-scripts|<role>|Install scripts of the specified Ansbile role.")
|
||||
|
||||
for row in "${rows[@]}"; do
|
||||
IFS='|' read -r cmd opt desc <<< "$row"
|
||||
|
||||
Reference in new issue
Block a user