Skip to content

Commit d7cbd14

Browse files
author
Florian Heinze
committed
TASK: improved README on autocompletion
1 parent e7e40f3 commit d7cbd14

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Use a shell script to document recurring development tasks and run them from any
44
folder structure using `dev some-task` while still being able to run them without this helper calling the
55
script directly `./dev.sh some-task`.
66

7+
[[_TOC_]]
8+
79
## Features
810

911
* run your development tasks from within a nested folder structure
@@ -54,7 +56,21 @@ run `brew install sandstorm/tap/dev-script-runner` to install
5456

5557
run `brew upgrade sandstorm/tap/dev-script-runner` to upgrade
5658

57-
run `dev completion [bash|zsh|fish|powershell] --help` and follow instructions on how to setup autocompletion
59+
### Autocompletion
60+
61+
run `dev completion [bash|zsh|fish|powershell] --help` and follow instructions on how to set up autocompletion
62+
63+
> For **MacOS on ARM** the zsh instructions will not work. You have to add the
64+
>
65+
> `$(brew --prefix)/share/zsh/site-functions` to your `FPATH`
66+
>
67+
> before calling `autoload -U compinit; compinit`
68+
> ```bash
69+
> FPATH=“$(brew --prefix)/share/zsh/site-functions:${FPATH}
70+
> autoload -U compinit; compinit
71+
> ```
72+
73+
### Initialization
5874
5975
Go to your project root and run `dev DSR_INIT` to create a `dev.sh` and a `dev_setup.sh` with examples for different types of tasks.
6076
The `$@` at the end of your `dev.sh` dispatches the script arguments to a function (so `dev sometask` calls `sometask`).
@@ -96,9 +112,9 @@ function sometask() {
96112
}
97113
```
98114
99-
`$@` can be pretty useful for passing all arguments to other tasks in your `dev.sh`.
115+
`$@` can be used for passing all arguments to other tasks in your `dev.sh`.
100116
101-
`$@` should always be present at the end of our your `dev.sh` script.
117+
`$@` MUST always be present at the end of our your `dev.sh` script.
102118
103119
### Documenting Tasks
104120

0 commit comments

Comments
 (0)