Skip to content

Instantly share code, notes, and snippets.

@rskuipers
Last active August 29, 2015 14:25
Show Gist options
  • Save rskuipers/78801f305ebc678ca8b6 to your computer and use it in GitHub Desktop.
Save rskuipers/78801f305ebc678ca8b6 to your computer and use it in GitHub Desktop.
Scratch alias to quickly execute your scratch files made from PhpStorm
# Add this to your .bashrc and adjust the paths
scratch() {
php ~/Library/Preferences/WebIde90/scratches/$1
}
_scratch() {
local cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $(compgen -W "$(ls ~/Library/Preferences/WebIde90/scratches/)" -- $cur) )
}
complete -o default -F _scratch scratch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment