# Usage: gq query.txt gq() { if [ ! -f $1 ]; then echo "ERROR: No such file $1" return fi local query=$(cat $1) bash -xc "$(printf "gh api graphql -f query='%s'" "$query")" }