summaryrefslogtreecommitdiffstats
path: root/README.markdown
diff options
context:
space:
mode:
authorChet Henry2015-12-08 19:05:35 -0700
committerChet Henry2015-12-08 19:05:35 -0700
commit0fafa9479d8e7c56c25020f29bca54114d7e564f (patch)
tree6c867888795afa539de3c896a765c73693977b98 /README.markdown
parent7b3d69b977a049034f30725afb3497d83f7d1095 (diff)
downloadhcl-0fafa9479d8e7c56c25020f29bca54114d7e564f.tar.bz2
Adding Extensive Bas Tab Completion
Tab completion will now use the calling script to generate suggestions. Because of this those suggestions will work with the alias scheme described in the README file. These completion functions will also suggest the commands hcl allows. When the alias command is in use it will complete the project ids and task ids with descriptions. The other commands that use aliases will complete them as before however they used the calling script to get the list of aliases. That way the any bash alises using env's will be called and preserve the configuration. This will allow the user to only add one line to their bashrc/profile w/e and not a line for each bash alias the user may need.
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown14
1 files changed, 5 insertions, 9 deletions
diff --git a/README.markdown b/README.markdown
index 6e24544..e08535e 100644
--- a/README.markdown
+++ b/README.markdown
@@ -124,15 +124,12 @@ The above starts and immediately stops a one-hour timer with the given note.
## ADVANCED USAGE
-### Bash Auto-completion of Task Aliases
+### Bash Tab Completions
-You can enable auto-completion of task aliases by adding this to your shell
-configuration (note the backticks inside the double quotes):
+You can enable auto-completion of commands, project ids, task ids and task aliases by adding this to your shell
+configuration:
- complete -W "`cat ~/.hcl/aliases`" hcl
-
-Warning: You will need to have run `hcl` at least once to create the aliases
-file. Without it, this command will fail with an error.
+ source _hcl_completions
### Configuration Profiles
@@ -143,10 +140,9 @@ once, specify an alternate configuration directory in the environment as
once.
Here is a shell alias `myhcl` with a separate configuration from the
-main `hcl` command, and another command to configure alias completion:
+main `hcl` command, tab completion will work with the alias automatically:
alias myhcl="env HCL_DIR=~/.myhcl hcl"
- complete -W "`cat ~/.myhcl/aliases`" myhcl
Adding something like the above to your bashrc will enable a new command,
`myhcl`. When using `myhcl` you can use different credentials and aliases,