[koha-commits] main Koha release repository branch master updated. v3.14.00-1169-gfd0e8ff
Git repo owner
gitmaster at git.koha-community.org
Mon May 5 17:38:25 CEST 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".
The branch, master has been updated
via fd0e8ff0adeff322c3defea0b4f6b29bde7ffa51 (commit)
from 15a5140f3673185136d6465b300813ff1c0097d4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit fd0e8ff0adeff322c3defea0b4f6b29bde7ffa51
Author: Tomas Cohen Arazi <tomascohen at gmail.com>
Date: Thu Aug 29 16:03:11 2013 -0300
Bug 10003: bash-completion for koha-list and other scripts
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 at rot13.org>
Signed-off-by: Jonathan Druart <jonathan.druart at biblibre.com>
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
-----------------------------------------------------------------------
Summary of changes:
debian/koha-common.bash-completion | 171 ++++++++++++++++++++++++++++++++++++
debian/rules | 2 +-
2 files changed, 172 insertions(+), 1 deletion(-)
create mode 100644 debian/koha-common.bash-completion
hooks/post-receive
--
main Koha release repository
More information about the koha-commits
mailing list