cloudsidedev / appside

Multitenant environment automation.
http://cloudside.ch
GNU Affero General Public License v3.0
38 stars 7 forks source link

No bash completion for appflow bin #39

Closed ocean90 closed 6 years ago

ocean90 commented 7 years ago

The appflow bin from #25 works great but it doesn't support autocomplete for arguments.


➜  appflow git:(master) make [tab]
all              debug            firstrun         jenkins          provision-debug  status           tenant           vagrant
args             decrypt          help             limit            reset            support          uninstall        vagrant-centos
checkin          encrypt          init             local            skip_tags        syntax-check     update           vault
checkout         env              install          provision        ssh              tags             url              verbose

➜  appflow git:(master) appflow [tab]
LICENSE                            Vagrantfile*                       config.example                     playbooks/
Makefile                           Vagrantfile.local.yml              docker-compose.yml                 utils/
README.md                          Vagrantfile.local.yml.sample.yaml  docs/                              \~pwd/
Vagrant-Boxes@                     appflow*                           examples/
neverything commented 7 years ago

@ocean90 they are on it 👍

ivomarino commented 7 years ago

@ocean90 any suggestions/example on how to implement zsh auto-completion? you did something in the past as far as I can remember, thanks.

ocean90 commented 7 years ago

Right, that was for assh, see https://github.com/moul/advanced-ssh-config/issues/180.

89luca89 commented 7 years ago

Initial work for BASH: here

ocean90 commented 7 years ago

Looks like f4b96337d7912cd4c5a9c86dbed40fe821c2003a broke the install on a non-bash/non-linux machine:

appflow install
Password:
/usr/local/bin/appflow: line 11: ho: command not found
    [tags]      =   { ansible | apache2 | apache2-conf | apt | apt-listchanges |
                  apticron | assh | assh-conf | autossh | autossh-conf | base_packages |
                  borg | borgmatic | cloud | clustercheck | common | composer | env |
                  environment | etckeeper | fstab | geoip | glusterfs | golang | grafana |
                  groups | haproxy | haproxy-acl | haproxy-conf | hold | hosts | htaccess |
                  htpasswd | icinga | icinga-conf | icinga-conf-etc | icinga-conf-hosts |
                  icinga-ssh | jenkins | keepalived | keepalived-conf | lvm | motd | munin |
                  munin-conf | mysql | mysql-conf | mysql-users | mysqlpass | nodejs | ntp |
                  nullmailer | percona | php | php-conf | pkg | rsyslog | shell | shell-users |
                  smtpd | ssh | ssh-keys | ssl | ssl-conf | sudo | swap | update | users | varnish |
                  varnish-conf | vhosts | web_packages | wp-cli | xfs | yum_proxy }
/usr/local/bin/appflow: line 23: syntax error near unexpected token `elif'
/usr/local/bin/appflow: line 23: `elif [[ $1 != 'vagrant' ]]; then'
ivomarino commented 7 years ago

brew install bash, version 4.4 is required, this is now handled also by the one-liner installer.

ocean90 commented 7 years ago

OS X + zsh:

➜  appflow git:(master) appflow install
#############################
Installing AppFlow...
#############################
Password:
utils/install.sh: line 12: /usr/local/etc/bash_completion: No such file or directory
make: *** [install] Error 1
➜  appflow git:(master) appflow install
#############################
Installing AppFlow...
#############################
utils/install.sh: line 12: /usr/local/etc/bash_completion: No such file or directory
make: *** [install] Error 1
ivomarino commented 7 years ago

Thanks for hint, we'll debug it on our macOS VM asap.

ivomarino commented 7 years ago

maybe you need to brew bash-completion before

ivomarino commented 7 years ago

will be implement in the AppFlow Symfony CLI: https://github.com/ttssdev/appflow/issues/55.

89luca89 commented 6 years ago

Fixed in appflow python port

appflow.py init

will deploy the default assh folders and enable bash completion for shell