Skip to content

Commit c0c4848

Browse files
authored
docs(readme): correct information (#30)
1 parent c30754d commit c0c4848

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

readme.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ if (env.prev === '--loglevel') {
276276

277277
## Completion mechanism
278278

279-
Feel free to browse the [scripts](./scripts) directory to inspect the various
279+
Feel free to browse the [examples](./examples) directory to inspect the various
280280
template files used when creating a completion with `tabtab.install()`.
281281

282282
Here is a Bash completion snippet created by tabtab.
@@ -297,9 +297,15 @@ if type complete &>/dev/null; then
297297
IFS=$'\n' COMPREPLY=($(COMP_CWORD="$cword" \
298298
COMP_LINE="$COMP_LINE" \
299299
COMP_POINT="$COMP_POINT" \
300-
tabtab-test completion -- "${words[@]}" \
300+
SHELL=bash \
301+
tabtab-test completion-server -- "${words[@]}" \
301302
2>/dev/null)) || return $?
302303
IFS="$si"
304+
305+
if [ "$COMPREPLY" = "__tabtab_complete_files__" ]; then
306+
COMPREPLY=($(compgen -f -- "$cword"))
307+
fi
308+
303309
if type __ltrim_colon_completions &>/dev/null; then
304310
__ltrim_colon_completions "${words[cword]}"
305311
fi
@@ -311,7 +317,7 @@ fi
311317

312318
The system is quite simple (though hard to nail it down, thank you npm). A new
313319
Bash function is created, which is invoked whenever `tabtab-test` is tab
314-
completed. This function then invokes the completer `tabtab-test completion`
320+
completed. This function then invokes the completer `tabtab-test completion-server`
315321
with `COMP_CWORD`, `COMP_LINE` and `COMP_POINT` environment variables (which is
316322
parsed by `tabtab.parseEnv()`).
317323

0 commit comments

Comments
 (0)