@@ -349,50 +349,29 @@ functionality to your script in one of three ways:
349349
350350The bash completions generation is completely automatic, and you will have to
351351rerun the ` bashly add comp * ` command whenever you change your ` bashly.yml `
352- script .
352+ file .
353353
354354In addition to suggesting subcommands and flags, you can instruct bashly to
355- also suggest files, directories, users and more. To do this, add another option
356- in your ` bashly.yml ` on the command you wish to alter:
355+ also suggest files, directories, users, git branches and more. To do this,
356+ add another option in your ` bashly.yml ` on the command you wish to alter:
357357
358358``` yaml
359359# bashly.yml
360360commands :
361361- name : upload
362362 help : Upload a file
363- completions : [directory, user]
363+ completions :
364+ - <directory>
365+ - <user>
366+ - $(git branch 2> /dev/null)
364367
365368```
366369
367- Valid completion additions are:
368-
369- | Keyword | Meaning
370- |-------------|---------------------
371- | ` alias ` | Alias names
372- | ` arrayvar ` | Array variable names
373- | ` binding ` | Readline key binding names
374- | ` builtin ` | Names of shell builtin commands
375- | ` command ` | Command names
376- | ` directory ` | Directory names
377- | ` disabled ` | Names of disabled shell builtins
378- | ` enabled ` | Names of enabled shell builtins
379- | ` export ` | Names of exported shell variables
380- | ` file ` | File names
381- | ` function ` | Names of shell functions
382- | ` group ` | Group names
383- | ` helptopic ` | Help topics as accepted by the help builtin
384- | ` hostname ` | Hostnames, as taken from the file specified by the HOSTFILE shell variable
385- | ` job ` | Job names
386- | ` keyword ` | Shell reserved words
387- | ` running ` | Names of running jobs
388- | ` service ` | Service names
389- | ` signal ` | Signal names
390- | ` stopped ` | Names of stopped jobs
391- | ` user ` | User names
392- | ` variable ` | Names of all shell variables
393-
394- Note that these are taken from the [ Programmable Completion Builtin] [ compgen ] ,
395- and will simply be added using the ` compgen -A action ` command.
370+ - Anything between ` <...> ` will be added using the ` compgen -A action ` flag.
371+ - Anything else, will be appended to the ` compgen -W ` flag.
372+
373+ For more information about these custom completions, see the documentation for
374+ the [ completely] [ completely ] gem.
396375
397376
398377## Real World Examples
0 commit comments