Remove macOS and PhpStorm logic
This commit is contained in:
parent
e9a8ec2734
commit
b7541a195e
|
@ -11,19 +11,6 @@ function mkd() {
|
||||||
mkdir -p "$@" && cd "$@"
|
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() {
|
function composer() {
|
||||||
docker run -u $UID -it --rm \
|
docker run -u $UID -it --rm \
|
||||||
-v $(pwd):/app \
|
-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,
|
# antigen.zsh has been downloaded manually for now,
|
||||||
# see https://github.com/zsh-users/antigen/issues/659.
|
# see https://github.com/zsh-users/antigen/issues/659.
|
||||||
source $HOME/.antigen.zsh
|
source $HOME/.antigen.zsh
|
||||||
fi
|
|
||||||
|
|
||||||
antigen bundle mollifier/cd-gitroot
|
antigen bundle mollifier/cd-gitroot
|
||||||
antigen bundle zsh-users/zsh-autosuggestions
|
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() {
|
ensure_tmux_is_running() {
|
||||||
if _not_inside_tmux && _not_inside_phpstorm; then
|
if _not_inside_tmux; then
|
||||||
tat
|
tat
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue