File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
280280template files used when creating a completion with ` tabtab.install() ` .
281281
282282Here 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
311317
312318The system is quite simple (though hard to nail it down, thank you npm). A new
313319Bash 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 `
315321with ` COMP_CWORD ` , ` COMP_LINE ` and ` COMP_POINT ` environment variables (which is
316322parsed by ` tabtab.parseEnv() ` ).
317323
You can’t perform that action at this time.
0 commit comments