Tomas Cohen Arazi
fd0e8ff0ad
This patch implements bash-completion for the following commands: - koha-list - koha-enable - koha-disable - koha-email-enable - koha-email-disable - koha-enable-sip - koha-start-sip - koha-restart-sip - koha-stop-sip - koha-start-zebra - koha-stop-zebra - koha-restart-zebra It is implemented in a way that it removes already used or mutually exclusive parameters (instance names, option switches). I already have written completion for other (more complex) commands, but I belive a simpler patch is better to start with. IMPORTANT: this patch relies on having the koha-list command available in the path. To test: - Make sure you have bash-completion installed and enabled (IRC might help us if you encounter problems). - Apply the patch. Option 1: - Pick the debian/koha-common.bash-completion file and do $ cp debian/koha-common.bash-completion /etc/bash_completion.d/koha-common - Open a new bash shell (I do it opening a new terminal on my Ubuntu box). - Type one of the listed commands... And repeatedly press <TAB>. - Enjoy, and signoff if you belive it is usable. Otherwise report back. Option 2: - run: $ . debian/koha-common.bash-completion - Type one of the listed commands... And repeatedly press <TAB>. - Enjoy, and signoff if you belive it is usable. Otherwise report back. Tests: - Some koha-list option switches are mutually exclusive, -h should be available in any context - koha-enable should only autocomplete disabled instances - koha-disable should only autocomplete enabled instances - koha-email-enable should only autocomplete email-disabled instances - koha-email-disable should only autocomplete email-enabled instances - koha-*-zebra scripts should only autocomplete enabled instances. - koha-*-sip scripts should only autocomplete sip-enabled instances. Regards To+ Note: writing bash-completion routines is a bit hacky, I tried to make it the simplest way I could. Your comments are welcome. Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com> |
||
---|---|---|
.. | ||
docs | ||
scripts | ||
source | ||
templates | ||
bd-to-depends | ||
build-git-snapshot | ||
changelog | ||
compat | ||
control | ||
control.in | ||
copyright | ||
koha-common.bash-completion | ||
koha-common.config | ||
koha-common.cron.d | ||
koha-common.cron.daily | ||
koha-common.cron.hourly | ||
koha-common.default | ||
koha-common.dirs | ||
koha-common.docs | ||
koha-common.init | ||
koha-common.install | ||
koha-common.logrotate | ||
koha-common.postinst | ||
koha-common.README.Debian | ||
koha-common.templates | ||
koha-post-install-setup | ||
koha.apache-ports | ||
koha.config | ||
koha.dirs | ||
koha.install | ||
koha.postinst | ||
koha.postrm | ||
koha.prerm | ||
koha.README.Debian | ||
list-deps | ||
README.build | ||
rules | ||
unavailable.html | ||
update-control |
In order to build .deb packages, following debian packages need to be present (installed): devscripts pbuilder dh-make fakeroot As root (or sudo) execute: pbuilder create Executing build-git-snapshot without any arguments will leave package and the rest in some pbuilder dir, eg. /var/cache/pbuilder/result It is highly recommended that --buildresult option is used.