diff --git a/.zsh/configs/functions.zsh b/.zsh/configs/functions.zsh index daaef87..6b50fcf 100644 --- a/.zsh/configs/functions.zsh +++ b/.zsh/configs/functions.zsh @@ -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 \ diff --git a/.zsh/configs/plugins.zsh b/.zsh/configs/plugins.zsh index 3255541..6a1243e 100644 --- a/.zsh/configs/plugins.zsh +++ b/.zsh/configs/plugins.zsh @@ -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 diff --git a/.zsh/configs/tmux.zsh b/.zsh/configs/tmux.zsh index 2077aa6..61e6ad0 100644 --- a/.zsh/configs/tmux.zsh +++ b/.zsh/configs/tmux.zsh @@ -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 }