MSYSGit Bash:“dirspell”是否正常工作?

问题描述

我在 Git Bash 中激活了 dirspell 选项,但它似乎没有按预期工作。 我已尝试通过执行以下操作重新创建 this answer 中建议的测试环境:

$ bash --version | head -1
GNU bash,version 4.4.23(1)-release (x86_64-pc-msys)

$ shopt | egrep '(^dir*|autocd|cdspell)'
autocd          on
cdspell         on
direxpand       on
dirspell        on

$ pwd
/c/Users/Hirsute/abc

$ ls
spam/

如果我执行以下操作,参数将正确扩展为“spam/test.txt”:

$ cat spam/test [tab] [return]
hello world

但是,如果我执行以下操作,则不会扩展参数并且 cat 返回错误

$ cat span/test [tab] [return]
cat: span/test: No such file or directory

According to this post,Bash 4.2 有一个dirspell 相关的错误,该错误似乎已在后续版本中修复,但随 Git for Windows 分发的 Bash 版本是 4.4。这是否仍然是相同的错误,还是我没有理解 dirspell 的实际作用?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)