Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Install from command line? #6

Closed
gramic opened this issue Sep 3, 2014 · 8 comments
Closed

Run Install from command line? #6

gramic opened this issue Sep 3, 2014 · 8 comments

Comments

@gramic
Copy link

gramic commented Sep 3, 2014

I would like to run the installation of the plugins from command line and not from key binding.

@bruno-
Copy link
Member

bruno- commented Sep 4, 2014

You can run this:

~/.tmux/plugins/tpm/scripts/install_plugins.sh

It's the same script the prefix + I key is bound to.

@bruno-
Copy link
Member

bruno- commented Sep 4, 2014

Also, I'm curious, why do you need to run it from the command line?

@gramic
Copy link
Author

gramic commented Sep 4, 2014

I am using bash/Dockerfile script to create a VM/image for development environment and would like to have everything ready after the script finishes.

However, install_plugins.sh is interactive at the end of the installation and asks "Done, press ENTER to continue.". Any way to make it continue without human intervention?

@bruno-
Copy link
Member

bruno- commented Sep 4, 2014

Hm, I've never though about that use case, but yes it should be possible.

Here are the steps I just ran from plain terminal (no tmux) and it all went well.

# start a server but don't attach to it
tmux start-server
# create a new session but don't attach to it either
tmux new-session -d
# install the plugins
~/.tmux/plugins/tpm/scripts/install_plugins.sh
# killing the server is not required, I guess
tmux kill-server

@gramic
Copy link
Author

gramic commented Sep 4, 2014

Yes, that works. Thank you for the help and the great plugin!

@ghost
Copy link

ghost commented May 26, 2015

That helped me too! Thank you!
It is an awesome tool!

wf72 pushed a commit to wf72/zsh_bootstrap that referenced this issue Jul 4, 2018
@unknownue
Copy link

unknownue commented Jan 19, 2020

For docker configuration, I recommend to add sleep 1 before calling install_plugins.sh to wait for tmux server launch, otherwise the following error may trigger

unknown variable: TMUX_PLUGIN_MANAGER_PATH
FATAL: Tmux Plugin Manager not configured in tmux.conf

A complete example in Dockerfile may be

RUN tmux start-server && \
    tmux new-session -d && \
    sleep 1 && \
    ~/.tmux/plugins/tpm/scripts/install_plugins.sh && \
    tmux kill-server

@DavidCain
Copy link

Note that (as of 2015) a new install script was created that supports automatic installation without the fuss of starting up a tmux server. Just call:

$  ~/.tmux/plugins/tpm/bin/install_plugins

From the script:

# Script intended for use via the command line.
#
# `.tmux.conf` needs to be set for TPM. Tmux has to be installed on the system,
# but does not need to be started in order to run this script.

Also, see the docs section on Automatic tpm installation.

snappy316 added a commit to snappy316/dotfiles that referenced this issue May 8, 2020
iloveitaly added a commit to iloveitaly/tpm that referenced this issue Oct 19, 2022
ebkalderon added a commit to ebkalderon/dotfiles that referenced this issue Feb 21, 2024
This hook runs after the installation completes, allowing us to install
our TPM plugins in `tmux` programmatically, as per this issue:

tmux-plugins/tpm#6
devlopersabbir added a commit to devlopersabbir/tpm that referenced this issue Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants