Last active
August 29, 2015 14:18
-
-
Save todashuta/fc6e3f31176cf770a95c to your computer and use it in GitHub Desktop.
ql (quicklook wrapper script)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # quicklook wrapper script | |
| if [ "$1" = '-v' ] | |
| then | |
| shift | |
| qlmanage -p -d 4 "$@" | |
| else | |
| qlmanage -p "$@" >/dev/null 2>&1 | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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