Remove macOS and PhpStorm logic

This commit is contained in:
Oliver Davies 2021-06-10 23:08:32 +01:00
parent e9a8ec2734
commit b7541a195e
3 changed files with 4 additions and 36 deletions

View file

@ -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 \

View file

@ -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

View file

@ -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
}