Compare commits

...

2 Commits

Author SHA1 Message Date
bretello 120cd3f4d9
zsh: fix autoupgrade script for antidote 2024-04-22 09:50:05 +02:00
bretello c572b2cb10
zsh: fix command lookup using $+array[] syntax 2024-04-22 09:47:24 +02:00
2 changed files with 7 additions and 7 deletions

View File

@ -39,12 +39,12 @@ if [[ ! ${zsh_plugins}.zsh -nt ${zsh_plugins}.txt ]]; then
antidote bundle <${zsh_plugins}.txt >>${zsh_plugins}.zsh
if [[ $+commands[systemctl] ]]; then
if (( $+commands[systemctl] )); then
antidote bundle robbyrussell/oh-my-zsh path:plugins/systemd >>${zsh_plugins}.zsh
fi
if [[ $+commands[pacman] ]]; then
if (( $+commands[pacman] )); then
antidote bundle robbyrussell/oh-my-zsh path:plugins/archlinux >>${zsh_plugins}.zsh
elif [[ $+commands[apt-get] ]]; then
elif (( $+commands[apt-get] )); then
antidote bundle robbyrussell/oh-my-zsh path:plugins/debian >>${zsh_plugins}.zsh
fi
@ -60,7 +60,7 @@ source $DOTFILES/extras/completion_style.zsh
source $DOTFILES/extras/colors.zsh
source $DOTFILES/extras/fzf-tab-config.zsh
if [[ $+commands[fd] ]]; then
if (( $+commands[fd] )); then
export FZF_CTRL_T_COMMAND='fd'
else
export FZF_CTRL_T_COMMAND='find'
@ -112,8 +112,8 @@ export ZSH_AUTOSUGGEST_COMPLETION_IGNORE='* \#*' # prevent completion for commen
# less options
export LESS='-xRF-j12' # -j12: displays 12 lines before search results with / and ?
if [[ $+commands[bat] || $+commands[batcat] ]]; then
if [[ $+commands[bat] ]]; then cmd=bat else cmd=batcat fi
if (( $+commands[bat] || $+commands[batcat] )); then
if (( $+commands[bat] )); then cmd=bat else cmd=batcat fi
alias cat=$cmd
export PAGER=$cmd

View File

@ -30,7 +30,7 @@ function _update_dotfiles_update() {
function update_dotfiles() {
(cd $DOTFILES; git pull -q --rebase && echo "Succesfully upgraded dotfiles" || echo "Could not upgrade dotfiles.")
(cd $DOTFILES/antidote && git pull -rebase || echo "Could not upgrade antidote")
(cd $DOTFILES/antidote && git pull --rebase || echo "Could not upgrade antidote")
vim -c 'PlugUpdate|PlugClean|qa!'
# update the zsh file
_update_dotfiles_update