diff --git a/dotfiles/.bash_logout b/dotfiles/.bash_logout index 83e434d8..972aeffc 100644 --- a/dotfiles/.bash_logout +++ b/dotfiles/.bash_logout @@ -2,4 +2,4 @@ if [ "$SHLVL" = 1 ]; then [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q -fi \ No newline at end of file +fi diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc index 75c8fe23..68985d84 100644 --- a/dotfiles/.bashrc +++ b/dotfiles/.bashrc @@ -229,13 +229,13 @@ export MCFLY_KEY_SCHEME=vim [ -f ~/.local/fzf.bash ] && source ~/.local/fzf.bash ### Google Cloud SDK -if type brew &> /dev/null; then +if command -v brew > /dev/null; then [[ ! -f "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc" ]] || source "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc" [[ ! -f "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc" ]] || source "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc" fi ### zoxide -type zoxide &> /dev/null && eval "$(zoxide init bash)" +command -v zoxide > /dev/null && eval "$(zoxide init bash)" ### Fig [[ -f "$HOME/.fig/shell/bashrc.post.bash" ]] && . "$HOME/.fig/shell/bashrc.post.bash" diff --git a/dotfiles/.profile b/dotfiles/.profile index fc057c86..c7668ffe 100644 --- a/dotfiles/.profile +++ b/dotfiles/.profile @@ -61,10 +61,10 @@ down4me() { # GAM - a command-line tool for Google Workspace. This alias will run gam or install gam if it is not already installed. gam() { - if type gam &> /dev/null; then + if command -v gam > /dev/null; then gam "$@" else - bash <(curl -s -S -L https://git.io/install-gam) + TMP="$(mktemp)" && curl -sSL https://git.io/install-gam > "$TMP" && bash "$TMP" fi } @@ -98,7 +98,7 @@ provision () { # Run the quickstart script quickstart() { - if type qvm-run &> /dev/null; then + if command -v qvm-run > /dev/null; then qvm-run --pass-io personal "curl -sSL https://install.doctor/qubes" > "$HOME/setup.sh" && bash "$HOME/setup.sh" elif [ -d '/Applications' ] && [ -d '/Users' ] && [ -d '/Library' ]; then curl -sSL https://install.doctor/quickstart > "$HOME/setup.sh" && bash "$HOME/setup.sh" @@ -118,7 +118,7 @@ randomstring() { } # Launch rclone admin GUI -rclone-gui() { +rclonegui() { rclone rcd --rc-web-gui --rc-user=admin --rc-pass=pass --rc-serve } @@ -273,7 +273,7 @@ if [ -f "$HOME/.cargo/env" ]; then . "$HOME/.cargo/env" fi -if type brew &> /dev/null; then +if command -v brew > /dev/null; then ### Go export GOPATH="${HOME}/.local/go" export GOROOT="$(brew --prefix golang)/libexec" diff --git a/dotfiles/.zshrc b/dotfiles/.zshrc index 3c62a272..14ce39c6 100644 --- a/dotfiles/.zshrc +++ b/dotfiles/.zshrc @@ -341,7 +341,7 @@ find() { ### Antigen [[ ! -f ~/.local/antigen.zsh ]] || source ~/.local/antigen.zsh -if type antigen &> /dev/null; then +if command -v antigen > /dev/null; then antigen use oh-my-zsh antigen bundle git antigen bundle bundler @@ -362,7 +362,7 @@ fi [ -f ~/.local/fzf.zsh ] && source ~/.local/fzf.zsh ### Google Cloud SDK -if type brew &> /dev/null; then +if command -v brew > /dev/null; then [[ ! -f "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc" ]] || source "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc" [[ ! -f "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc" ]] || source "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc" fi @@ -372,7 +372,7 @@ fpath+=~/.zfunc ### zoxide # TODO: Ensure zoxide.vim is installed -type zoxide &> /dev/null && eval "$(zoxide init zsh)" +command -v zoxide > /dev/null && eval "$(zoxide init zsh)" ### Fig [[ -f "$HOME/.fig/shell/zshrc.post.zsh" ]] && . "$HOME/.fig/shell/zshrc.post.zsh"