From b4c89884e0a8a97fdc1fd470688677867e14e801 Mon Sep 17 00:00:00 2001 From: Bruno Sutic Date: Sun, 21 Aug 2016 07:12:43 +0200 Subject: [PATCH] Document windows/cygwin issue with line endings Closes #81 --- docs/tpm_not_working.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/tpm_not_working.md b/docs/tpm_not_working.md index 99bdfb7..87d2998 100644 --- a/docs/tpm_not_working.md +++ b/docs/tpm_not_working.md @@ -60,3 +60,21 @@ Related: [issue #25](https://github.com/tmux-plugins/tpm/issues/25) Related: [issue #48](https://github.com/tmux-plugins/tpm/issues/48) - Make sure `tmux source ~/.tmux.conf` command is ran from inside `tmux`. + +
+ +> tpm not working: '~/.tmux/plugins/tpm/tpm' returned 2 (Windows / Cygwin) + +Related: [issue #81](https://github.com/tmux-plugins/tpm/issues/81) + +This issue is most likely caused by Windows line endings. For example, if you +have git's `core.autocrlf` option set to `true`, git will automatically convert +all the files to Windows line endings which might cause a problem. + +The solution is to convert all line ending to Unix newline characters. This +command handles that for all files under `.tmux/` dir (skips `.git` +subdirectories): + +```bash +find ~/.tmux -type d -name '.git*' -prune -o -type f -print0 | xargs -0 dos2unix +```