Documentation
¶
Overview ¶
Utility to enable bash completion for goQuery.
goQuery has extensive support for bash autocompletion. To enable autocompletion, you need to tell bash that it should use the `goquery_completion` program for completing `goquery` commands.
How to do this depends on your distribution.
On Debian derivatives, we suggest creating a file `goquery` in `/etc/bash_completion.d` with the following contents:
_goquery() {
case "$3" in
-d) # the -d flag specifies the database directory.
# we rely on bash's builtin directory completion.
COMPREPLY=( $( compgen -d -- "$2" ) )
;;
*)
if [ -x /usr/local/share/goquery_completion ]; then
mapfile -t COMPREPLY < <( /usr/local/share/goquery_completion bash "${COMP_POINT}" "${COMP_LINE}" )
fi
;;
esac
}
Click to show internal directories.
Click to hide internal directories.