每次我在Windows上的git bash中键入cd时,我都会得到以下文本:
$ cd Documents/
which: no bundle in (/c/Users/nfgal/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/nfgal/bin:/c/ProgramData/DockerDesktop/version-bin:/c/Program Files/Docker/Docker/Resources/bin:/c/Program Files (x86)/Razer Chroma SDK/bin:/c/Program Files/Razer Chroma SDK/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Users/nfgal/AppData/Local/Microsoft/WindowsApps:/cmd:/c/Program Files/dotnet:/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/c/WINDOWS/System32/OpenSSH:/c/ProgramData/chocolatey/bin:/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/130/Tools/Binn:/c/Program Files (x86)/Microsoft SQL Server/140/Tools/Binn:/c/Program Files/Microsoft SQL Server/140/Tools/Binn:/c/Program Files/Microsoft SQL Server/140/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/Client SDK/ODBC/130/Tools/Binn:/c/Program Files (x86)/Microsoft SQL Server/140/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/140/Tools/Binn/ManagementStudio:/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/c/Program Files/CMake/bin:/c/Program Files/Common Files/Autodesk Shared:/c/Program Files/Microsoft SQL Server/120/Tools/Binn:/c/Ruby26-x64/bin:/c/Users/nfgal/.cargo/bin:/c/Users/nfgal/AppData/Local/Microsoft/WindowsApps:/c/MinGW/bin:/c/Program Files/Java/jdk-11.0.2/bin:/c/Program Files/CMake/bin:/c/Program Files/Sublime Text 3:/c/Program Files/heroku/bin:/usr/bin/vendor_perl:/usr/bin/core_perl:/c/Users/nfgal/.rvm/bin:/c/Users/nfgal/.rvm/bin)
它会更改目录,但是由于某种原因每次都在调用该目录。自从我安装了rvm以来,这种情况一直在发生。这是我的〜/ .bashrc文件:
cd /d/
alias ll='ls -l'
alias refresh='source ~/.bash_profile'
alias subl='/c/Program\ Files/Sublime\ Text\ 3/sublime_text.exe'
alias bashrc='subl /c/Users/nfgal/.bashrc'
alias repos='cd /d/repos'
这是我的〜/ .bash_profile
test -f ~/.profile && . ~/.profile
test -f ~/.bashrc && . ~/.bashrc
〜/个人资料为空
答案 0 :(得分:0)
可能是PROMPT_COMMAND
。尝试echo $PROMPT_COMMAND
,如果有命令用unset PROMPT_COMMAND
取消设置。如果变量不在~/.bash_profile
中,请在~/.bashrc
中查找。
答案 1 :(得分:0)
删除〜/ .bash_profile中的行