Hack 6. Use “shopt -s cdspell” to automatically correct mistyped directory names on cd
by Ramesh
Use shopt -s cdspell to correct the typos in the cd command automatically as shown below. If you are not good at typing and make lot of mistakes, this will be very helpful.
- # cd /etc/mall
- -bash: cd: /etc/mall: No such file or directory
- # shopt -s cdspell
- # cd /etc/mall
- # pwd
- /etc/mail
- [Note: By mistake, when I typed mall instead of mail,
- cd corrected it automatically]
当前内容版权归 Ramesh Natarajan 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 Ramesh Natarajan .