Skip to content

Instantly share code, notes, and snippets.

@todashuta
Last active August 29, 2015 14:18
Show Gist options
  • Select an option

  • Save todashuta/fc6e3f31176cf770a95c to your computer and use it in GitHub Desktop.

Select an option

Save todashuta/fc6e3f31176cf770a95c to your computer and use it in GitHub Desktop.
ql (quicklook wrapper script)
#!/bin/sh
# quicklook wrapper script
if [ "$1" = '-v' ]
then
shift
qlmanage -p -d 4 "$@"
else
qlmanage -p "$@" >/dev/null 2>&1
fi
# quicklook wrapper function
#
# Example:
# $ ql Main.java
# $ ql -v main.go
# $ ql *.php
function ql() {
if [[ "$1" == '-v' ]]; then
shift
qlmanage -p -d 4 "$@" # -d : debug level (1-4)
else
qlmanage -p "$@" &>/dev/null # silence
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment