Git Bash after installing cygwin

after installing Cygwin on my Windows machine, Git Bash is broken. Each time I try to execute a command, the following error occurs:

sh.exe ": tput: command not found

Even reinstalling Git (Bash) didn't help ...

+4
source share
2 answers

Now this problem is resolved. In my docs (in ~\.bashrc ) there was a weird .bashrc that sets $PS1 to a new value using colors with the tput command. It does not exist in Git Bash and should not be there.

After commenting on the line where the parameter $PS1 was set / exported, everything became normal again.

The line was something like

 export PS1="$(tput ... 

(I do not remember him correctly.)

I donโ€™t know where it came from, maybe I accidentally copied it there for cygwin ...

+2
source

Perhaps you need to run the cygwin setup and find the ncurses package and install it .

(As suggested in this thread , and considering tput is part of the ncurses library )

another.anon.coward offers comments use the package-grep on Cygwin website, which confirms the need to install the ncurses:

package-grep for tput .


However, OP Philipp15b mentions in a comment:

This is the problem: we are talking about Git for Windows (msysgit) and as you say, it has nothing to do with Cygwin. But for some reason, installing Cygwin violated Git.

Try starting a DOS session using msysgit using git-cmd.bat using msysgit.
It organizes PATH :

 @set PATH=%git_install_root%\bin;%git_install_root%\mingw\bin;%git_install_root%\cmd;%PATH% 

This can help make sure that msysgit is not affected by other Cygwin commands that might be in the way.

+3
source

Source: https://habr.com/ru/post/1398186/


All Articles