Remove macOS and PhpStorm logic
This commit is contained in:
parent
e9a8ec2734
commit
b7541a195e
|
@ -11,19 +11,6 @@ function mkd() {
|
|||
mkdir -p "$@" && cd "$@"
|
||||
}
|
||||
|
||||
function db {
|
||||
if [ "$1" = "refresh" ]; then
|
||||
mysql -uroot -e "drop database $2; create database $2"
|
||||
elif [ "$1" = "create" ]; then
|
||||
mysql -uroot -e "create database $2"
|
||||
elif [ "$1" = "drop" ]; then
|
||||
mysql -uroot -e "drop database $2"
|
||||
fi
|
||||
}
|
||||
|
||||
is_linux() { [[ "$(uname)" == 'Linux' ]] }
|
||||
is_macos() { [[ "$(uname)" == "Darwin" ]] }
|
||||
|
||||
function composer() {
|
||||
docker run -u $UID -it --rm \
|
||||
-v $(pwd):/app \
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
if is_macos; then
|
||||
source /usr/local/share/antigen/antigen.zsh
|
||||
elif is_linux; then
|
||||
# antigen.zsh has been downloaded manually for now,
|
||||
# see https://github.com/zsh-users/antigen/issues/659.
|
||||
source $HOME/.antigen.zsh
|
||||
fi
|
||||
# antigen.zsh has been downloaded manually for now,
|
||||
# see https://github.com/zsh-users/antigen/issues/659.
|
||||
source $HOME/.antigen.zsh
|
||||
|
||||
antigen bundle mollifier/cd-gitroot
|
||||
antigen bundle zsh-users/zsh-autosuggestions
|
||||
|
|
|
@ -1,20 +1,5 @@
|
|||
_not_inside_tmux() {
|
||||
[[ -z "$TMUX" ]]
|
||||
}
|
||||
|
||||
_not_inside_phpstorm() {
|
||||
if is_macos; then
|
||||
# VS Code returns "vscode".
|
||||
# iTerm returns "iTerm.app".
|
||||
# PhpStorm returns nothing.
|
||||
[[ "$TERM_PROGRAM" != "" ]]
|
||||
elif is_linux; then
|
||||
[[ "$TERMINAL_EMULATOR" != "JetBrains"* ]]
|
||||
fi
|
||||
}
|
||||
|
||||
ensure_tmux_is_running() {
|
||||
if _not_inside_tmux && _not_inside_phpstorm; then
|
||||
if _not_inside_tmux; then
|
||||
tat
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue