now running updates only when using tmux without arguments

This commit is contained in:
aminnairi
2023-04-16 23:19:24 +02:00
parent 94cde63a7d
commit 215e1837a0
+19 -17
View File
@@ -1,26 +1,28 @@
function tmux
if type -q omf
# Update Oh My Fish if it installed
omf update
end
if test (count $argv) -eq 0
if type -q omf
# Update Oh My Fish if it installed
omf update
end
if test ! -d ~/.tmux/plugins/tpm
# Install TPM if it is not already installed
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
if test ! -d ~/.tmux/plugins/tpm
# Install TPM if it is not already installed
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# Install TPM plugins
~/.tmux/plugins/tpm/bin/install_plugins
else
# Install plugins that are not already installed
~/.tmux/plugins/tpm/bin/install_plugins
# Install TPM plugins
~/.tmux/plugins/tpm/bin/install_plugins
else
# Install plugins that are not already installed
~/.tmux/plugins/tpm/bin/install_plugins
# Update plugins that needs update
~/.tmux/plugins/tpm/bin/update_plugins all
# Update plugins that needs update
~/.tmux/plugins/tpm/bin/update_plugins all
# Clean plugins that are not used anymore
~/.tmux/plugins/tpm/bin/update_plugins all
# Clean plugins that are not used anymore
~/.tmux/plugins/tpm/bin/update_plugins all
end
end
# Execute TMUX
/usr/bin/tmux
/usr/bin/tmux $argv
end