Created
February 19, 2015 09:33
-
-
Save esamson/bd7ed1720461b985c377 to your computer and use it in GitHub Desktop.
OpenDJ subcommands -- instead of adding everything to your PATH
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
OPENDJ_HOME=~/.local/opt/opendj | |
if [ -z "$1" ] ; then | |
echo "Usage: $0 <command>" | |
echo | |
echo "Where <command> is one of:" | |
echo | |
ls -1 $OPENDJ_HOME/bin | |
exit 1 | |
fi | |
$OPENDJ_HOME/bin/$* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add to ~/.bashrc to get bash completion | |
_opendj() | |
{ | |
local cur opts | |
cur=${COMP_WORDS[COMP_CWORD]} | |
opts=`ls $HOME/.local/opt/opendj/bin` | |
COMPREPLY=( $(compgen -W "${opts}" -- $cur) ) | |
} | |
complete -F _opendj opendj |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment