aboutsummaryrefslogtreecommitdiff
path: root/files/dmtool.bash
diff options
context:
space:
mode:
Diffstat (limited to 'files/dmtool.bash')
-rw-r--r--files/dmtool.bash11
1 files changed, 8 insertions, 3 deletions
diff --git a/files/dmtool.bash b/files/dmtool.bash
index 0d7116f..677eb03 100644
--- a/files/dmtool.bash
+++ b/files/dmtool.bash
@@ -86,7 +86,7 @@ _dmtool()
{
COMPREPLY=()
local cur="${COMP_WORDS[COMP_CWORD]}"
- local commands="ls cp mkdir mv rm attacks roll attack damage heal save reset set edit add del spellcasting help git"
+ local commands="ls cp mkdir mv rm attacks roll attack damage heal save reset set edit add del spellcasting create help git"
if [[ $COMP_CWORD -gt 1 ]]; then
local lastarg="${COMP_WORDS[$COMP_CWORD-1]}"
case "${COMP_WORDS[1]}" in
@@ -114,7 +114,7 @@ _dmtool()
_dmtool_complete_entries
fi
;;
- attacks|roll|attack|damage|heal|save|set|edit|del|spellcasting)
+ attacks|roll|attack|damage|heal|save|set|edit|del|create|spellcasting)
if [[ $COMP_CWORD -le 2 ]]; then
_dmtool_complete_entries
else
@@ -146,7 +146,7 @@ _dmtool()
set)
if [[ $COMP_CWORD -eq 3 ]]; then
_dmtool_complete_skills_abilities
- COMPREPLY+=($(compgen -W "proficiency name" -- ${cur}))
+ COMPREPLY+=($(compgen -W "proficiency name cost weight" -- ${cur}))
elif [[ $COMP_CWORD -eq 4 ]]; then
local skills="$(_dmtool_skills)"
if [[ "$skills" =~ "$lastarg" ]]; then
@@ -158,6 +158,11 @@ _dmtool()
#TODO: Add items and spells
_dmtool_complete_skills_abilities
;;
+ create)
+ if [[ $COMP_CWORD -eq 3 ]]; then
+ COMPREPLY+=($(compgen -W "item weapon armor spell feature feature_attack creature" -- ${cur}))
+ fi
+ ;;
spellcasting)
if [[ $COMP_CWORD -eq 3 ]]; then
COMPREPLY+=($(compgen -W "init ability level" -- ${cur}))