GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — odootools/bash_completion.odoo at common · vertelab/odootools Expand file tree/ Copy pathbash_completion.odooMore file actions 98 lines (86 loc) · 2.04 KB / Copy pathbash_completion.odooFile metadata and controls98 lines (86 loc) · 2.04 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 # bash completion for Odoo projects _odoo_projects() { COMPREPLY=( $( compgen -W '$( command ls /usr/share | grep odoo)' -- $cur ) ) } _odoo_databases() { local dbs='$( command sudo su postgres -c "psql -At -c \"select datname from pg_database where datistemplate = false;\" postgres" )' COMPREPLY=( $( compgen -W "$dbs" -- $cur ) ) } _odoohosts(){ [ -f /etc/odoo/odoo.tools ] && . /etc/odoo/odoo.tools COMPREPLY=( $( compgen -W "$ODOOHOSTS" -- $cur ) ) } _cdp() { COMPREPLY=( $( compgen -W '$( command ls /usr/share | grep odoo)' -- $cur ) ) } complete -F _cdp cdp _cdb() { local cur COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} _odoo_databases } complete -F _cdb cdb complete -F _cdb sqldrop complete -F _cdb sqldump _check_prev_words() { for i in `seq 0 $(expr $COMP_CWORD - 1)`; do if [[ $1 == ${COMP_WORDS[i]} ]]; then return fi done options=$options\ $1 } __odoosync() { local cur local prev COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} if [[ $prev == -p ]]; then _odoo_projects elif [[ $prev == -h ]]; then _odoohosts else local options _check_prev_words -p _check_prev_words -h COMPREPLY=( $( compgen -W "$options" -- $cur ) ) fi } complete -F __odoosync odoosync __odoosyncall() { local cur local prev COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} if [[ $prev == -p ]]; then _odoo_projects elif [[ $prev == -h ]]; then _odoohosts else local options _check_prev_words -p _check_prev_words -h COMPREPLY=( $( compgen -W "$options" -- $cur ) ) fi } complete -F __odoosyncall odoosyncall __odoo_create_test_db() { local cur COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} if [[ $COMP_CWORD == 2 ]]; then COMPREPLY=( $( compgen -W "$(ls|grep .gz$)" -- $cur ) ) fi } complete -F __odoo_create_test_db odoocreatetestdb |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |