mirror of
https://github.com/aminnairi/dotfiles.git
synced 2026-09-14 16:52:12 +02:00
now running updates only when using tmux without arguments
This commit is contained in:
+19
-17
@@ -1,26 +1,28 @@
|
|||||||
function tmux
|
function tmux
|
||||||
if type -q omf
|
if test (count $argv) -eq 0
|
||||||
# Update Oh My Fish if it installed
|
if type -q omf
|
||||||
omf update
|
# Update Oh My Fish if it installed
|
||||||
end
|
omf update
|
||||||
|
end
|
||||||
|
|
||||||
if test ! -d ~/.tmux/plugins/tpm
|
if test ! -d ~/.tmux/plugins/tpm
|
||||||
# Install TPM if it is not already installed
|
# Install TPM if it is not already installed
|
||||||
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
||||||
|
|
||||||
# Install TPM plugins
|
# Install TPM plugins
|
||||||
~/.tmux/plugins/tpm/bin/install_plugins
|
~/.tmux/plugins/tpm/bin/install_plugins
|
||||||
else
|
else
|
||||||
# Install plugins that are not already installed
|
# Install plugins that are not already installed
|
||||||
~/.tmux/plugins/tpm/bin/install_plugins
|
~/.tmux/plugins/tpm/bin/install_plugins
|
||||||
|
|
||||||
# Update plugins that needs update
|
# Update plugins that needs update
|
||||||
~/.tmux/plugins/tpm/bin/update_plugins all
|
~/.tmux/plugins/tpm/bin/update_plugins all
|
||||||
|
|
||||||
# Clean plugins that are not used anymore
|
# Clean plugins that are not used anymore
|
||||||
~/.tmux/plugins/tpm/bin/update_plugins all
|
~/.tmux/plugins/tpm/bin/update_plugins all
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Execute TMUX
|
# Execute TMUX
|
||||||
/usr/bin/tmux
|
/usr/bin/tmux $argv
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user