Added bash completion for the server "jar" command.

This commit is contained in:
Marcus Whybrow 2012-05-31 08:40:16 +01:00
parent 223f589f9f
commit 9bc4abb0a7

View File

@ -80,6 +80,16 @@ _msm() {
;;
esac
fi
;;
jar)
if [[ $COMP_CWORD == 3 && -d "$JAR_STORAGE_PATH" ]]; then
options="$(ls -1 "$JAR_STORAGE_PATH")"
fi
if [[ $COMP_CWORD == 4 && -d "$JAR_STORAGE_PATH/${COMP_WORDS[3]}" ]]; then
options="$(find "$JAR_STORAGE_PATH/${COMP_WORDS[3]}" -type f -name "*.jar" -exec basename {} \;)"
fi
;;
esac
fi