本文介绍了shopt -s dirspell有什么作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法弄清楚,我了解shopt -s cdspell,但无法找出shopt -s dirspell做什么.
I cannot figure it out, i understand shopt -s cdspell but cannot find out what shopt -s dirspell does.
Bash参考指南说:
The Bash Reference Guide says:
dirspell
如果设置,则Bash尝试在单词完成过程中对目录名称进行拼写更正,如果最初提供的目录名称不存在.
If set, Bash attempts spelling correction on directory names during word completion if the directory name initially supplied does not exist.
我在几个目录上尝试了几次,但这不是行为.
I tried several times on several directories but that is not the behavior.
我在i386-apple-darwin10.7.0上使用bash 4.2.10(2)
I'm using bash 4.2.10(2) on i386-apple-darwin10.7.0
推荐答案
来自更改-日志
让我们尝试一下:
$ ls
spam/
$ cat spam/test
hello world
没有 dirspell
$ cat span/test [tab]
# nothing happens
含魔咒
$ shopt -s dirspell
$ cat span/test [tab]
#line is replaced by
$ cat /home/user/tmp/shopt/spam/test
这篇关于shopt -s dirspell有什么作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!