Skip to content

Instantly share code, notes, and snippets.

@bchatard
Created April 13, 2014 08:18
Show Gist options
  • Save bchatard/10574382 to your computer and use it in GitHub Desktop.
Save bchatard/10574382 to your computer and use it in GitHub Desktop.
PhpStorm open project
# add into /etc/profile
# PhpStorm
export PHPSTORM_PROJECT_BASE_PATH=$HOME'/Documents/PhpStorm/'
alias psop='phpstorm-open-project.sh'
#!/bin/bash
if [[ ! -z $1 ]] && [ -d $PHPSTORM_PROJECT_BASE_PATH$1 ]; then
pstorm $PHPSTORM_PROJECT_BASE_PATH$1
fi
# located in /usr/local/etc/bash_completion.d
_phpstorm-project-completion()
{
local cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $(compgen -W "$(ls $PHPSTORM_PROJECT_BASE_PATH)" -- $cur) )
}
complete -F _phpstorm-project-completion psop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment