aboutsummaryrefslogtreecommitdiff
path: root/zsh/zshrc
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2026-08-25 08:09:21 +0200
committerThomas Schmucker <ts@its1.de>2026-08-25 08:09:21 +0200
commitb0e1966d43575ce82aeef03560c33df0831ac976 (patch)
tree1adbd6a85e55370099eb6d415d6f19fa972cc29b /zsh/zshrc
parentc1b5efa4349bdf7b8b57663b260678dfadac62e8 (diff)
downloaddotfiles-b0e1966d43575ce82aeef03560c33df0831ac976.tar.gz
dotfiles-b0e1966d43575ce82aeef03560c33df0831ac976.tar.bz2
dotfiles-b0e1966d43575ce82aeef03560c33df0831ac976.zip
zsh: feinere update-funktionen
Diffstat (limited to 'zsh/zshrc')
-rw-r--r--zsh/zshrc37
1 files changed, 33 insertions, 4 deletions
diff --git a/zsh/zshrc b/zsh/zshrc
index 6f31eaa..ab3730d 100644
--- a/zsh/zshrc
+++ b/zsh/zshrc
@@ -80,11 +80,40 @@ alias pwgen='pwgen -s 48 1'
80alias ls='ls -G' 80alias ls='ls -G'
81 81
82# Funktionen 82# Funktionen
83npm-update() {
84 if (($+commands[npm])); then
85 npm update -g --loglevel=info
86 fi
87}
88
83nvim-update() { 89nvim-update() {
84 nvim --headless \ 90 if (($+commands[nvim])); then
85 -c "lua require[[lazy]].sync({ wait = true })" \ 91 nvim --headless \
86 -c "UpdateParsers" \ 92 -c "lua require[[lazy]].sync({ wait = true })" \
87 -c "qa" 93 -c "UpdateParsers" \
94 -c "qa"
95 fi
96}
97
98pkg-update() {
99 case "$OSTYPE" in
100 darwin*)
101 brew update && brew upgrade
102 ;;
103 freebsd*)
104 doas pkg update && doas pkg upgrade
105 ;;
106 *)
107 print -u2 "pkg-update: kein Paketmanager fuer $OSTYPE hinterlegt"
108 return 1
109 ;;
110 esac
111}
112
113system-update() {
114 npm-update || return
115 nvim-update || return
116 pkg-update
88} 117}
89 118
90# Command completion 119# Command completion