"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/yargs/completion.sh.hbs" (8 Mar 2017, 757 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 ###-begin-{{app_name}}-completions-###
    2 #
    3 # yargs command completion script
    4 #
    5 # Installation: {{app_path}} completion >> ~/.bashrc
    6 #    or {{app_path}} completion >> ~/.bash_profile on OSX.
    7 #
    8 _yargs_completions()
    9 {
   10     local cur_word args type_list
   11 
   12     cur_word="${COMP_WORDS[COMP_CWORD]}"
   13     args=$(printf "%s " "${COMP_WORDS[@]}")
   14 
   15     # ask yargs to generate completions.
   16     type_list=`{{app_path}} --get-yargs-completions $args`
   17 
   18     COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) )
   19 
   20     # if no match was found, fall back to filename completion
   21     if [ ${#COMPREPLY[@]} -eq 0 ]; then
   22       COMPREPLY=( $(compgen -f -- "${cur_word}" ) )
   23     fi
   24 
   25     return 0
   26 }
   27 complete -F _yargs_completions {{app_name}}
   28 ###-end-{{app_name}}-completions-###