From ec77c346fe5a3a4bc91a7f6449fc058bcf248b6b Mon Sep 17 00:00:00 2001 From: Mohamed Yehia <160925276+moyeh04@users.noreply.github.com> Date: Sat, 20 Jul 2024 05:23:17 +0300 Subject: [PATCH] Add another solution to tpm_not_working.md I've discovered an easier solution and decided to add it to the documentation --- docs/tpm_not_working.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/docs/tpm_not_working.md b/docs/tpm_not_working.md index 6680291..fa7197e 100644 --- a/docs/tpm_not_working.md +++ b/docs/tpm_not_working.md @@ -100,3 +100,39 @@ set-environment -g PATH "/opt/homebrew/bin:/bin:/usr/bin" ``` before any `run-shell`/`run` commands in `~/.tmux.conf`. + +
+ +> '~/.tmux/plugins/tpm/tpm' returned error code 127 (on Linux, either WSL or any distro, with tmux installed via Homebrew or APT) +> or maybe Mac (don't have one to test) + +This issue may be caused by one of the following: +1. You forgot to clone the repo so simply +```.sh +git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm +``` +2. Incorrect `.gitconfig` configuration. If your `.gitconfig` file contains the following: +```.gitconfig +[core] + autocrlf = true +``` +This setting may cause issues by changing line endings from LF to CRLF, which is not desirable in Linux/Mac Enviroments generally. To fix this, +change it to `input`: +Open the `.gitconfig` file by running: +```.sh +git config --global -e +``` +If the above command doesn't work, set your preferred editor first: +```.sh +git config --global core.editor "nvim" # or vim, or your preferred editor +``` +Then, update the `.gitconfig` file: +```.gitconfig +[core] + autocrlf = input #Keep it like that forever, Except if you are on Windows +``` +Save the configuration, and then run: +```.sh +rm -rf ~/.tmux/plugins && git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm +``` +After completing these steps, exit and restart tmux. Press `I` (uppercase `I` for Install) to reload and resolve the issue.