Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 15 lines (12 sloc) 301 Bytes
#!/usr/bin/env bash
set -e
COMMAND="$1"
if [ -z "$COMMAND" ]; then
echo "usage: a completions COMMAND [arg1 arg2...]" >&2
exit 1
fi
COMMAND_PATH="$(command -v "a-$COMMAND")"
if grep -i "^# provide a completions" "$COMMAND_PATH" >/dev/null; then
shift
exec "$COMMAND_PATH" --complete "$@"
fi