`
xfxlch
  • 浏览: 167496 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

Hack 6. Automatically Correct Mistyped Directory Names

阅读更多
[clu@portal.ny1 mail]$ pwd
/tmp/mail
[clu@portal.ny1 mail]$ cd /tmp/mall
-bash: cd: /tmp/mall: No such file or directory
[clu@portal.ny1 mail]$ shopt -s cdspell
[clu@portal.ny1 mail]$ cd /tmp/mall
/tmp/mail


上述命令是开启自动校正拼写错误的目录名字,对于经常拼写错误的孩子,可以帮你节约一点时间。

shopt命令:

shopt命令用于显示和设置shell中的行为选项,通过这些选项以增强shell易用性。shopt命令若不带任何参数选项,则可以显示所有可以设置的shell操作选项。

[语法]
shopt(选项)(参数)

[选项]
-s:激活指定的shell行为选项; -u:关闭指定的shell行为选项。

[参数]
shell选项:指定要操作的shell选项

[实例]
如上

通过命令查看选项的开启状态:
[clu@portal.ny1 mail]$ shopt cdspell
cdspell         on






分享到:
评论

相关推荐

    Linux-101-Hacks

    Automatically Correct Mistyped Directory Names 通过自定义函数,可以自动纠正错误拼写的目录名。 ```bash cd() { [ -d "$1" ] && builtin cd "$1" || echo "No such directory." } ``` ### Chapter 2: ...

    Linux101 Hacks 2rd

    Automatically Correct Mistyped Directory Names** 通过设置bash的自动补全功能,可以在键入部分目录名后按Tab键,bash会尝试自动补全目录名。如果存在多个匹配项,则再次按Tab键会显示所有可能的选择。 ### ...

    VB.programming.registry.automatically.WINDOWS.rar_Windows编程_Visual_Basic_

    在VB6或更早版本中,可以通过`MSComctlLib.Registry`控件,而在VB.NET中,可以使用`Microsoft.Win32.Registry`命名空间。 以下是一个简单的VB代码示例,演示如何将一个程序添加到启动项中: ```vb ' VB6 示例 ...

    cpp-4.4.7-23.el6.x86-64.rpm

    Cpp is a macro processor which is used automatically by the C compiler to transform your program before actual compilation. It is called a macro processor because it allows you to define macros, ...

    STG (SNMP Traffic Grapher)

    Second line lists values names. From third line starts actual program data. 3. Log file is rotated every N hours, days, weeks or months. Rotation happens at the end of hour, day, week or month ...

    acnsmauricedsmas:埃森哲·斯莫里斯(Accenture Smaurice)

    Automatically analyse your data and perform feature selection to determine which variables are more important than others2. Automatically model your data for seasonality: Winter, Shoulder, and Summer...

    vxworks_kernel_programmers_guide_6.9

    Component Names .......................................................................................... 10 Basic VxWorks Components ....................................................................

    Debugging with GDB --2007年

    Working directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Program Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Debugging a Running ...

    ImageSourceDownloader-crx插件

    Automatically create the directory name of the web page title in the download directory4. Use with Everything search software, the effect is better~ 语言:English,Français,Nederlands,español,...

    Hack代码生成工具HackCodegen.zip

    Hack Codegen 包括:Hack_builder to deal with the concatenationNew linesIndentationBracesHack keywordsCollectionsSigned files to re-generate code automatically when a schema is changed 标签:...

    slime用户手册

    Table of Contents ...6 Customization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 6.1 Emacs-side . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....

    mscal.ocx微软日历控件

    Automatically install the dll file You can now install MSCAL.OCX automatically with one click. Our ocx repair tool will fix your ocx errors instantly. 1. Download the ocx repair tool software and ...

    SQLPrompt_7.3.0.522

    Variables are now declared automatically for ouput parameters when generating an EXEC statement Rearranged the DML page in the formatting options Minor tweaks and text changes to formatting options ...

    Android代码-Count

    But really all they had go do was target marshmallow's SDK level and they get the auto backup and restore for free, automatically. Automatically restored when you restore your device. So

    visus807.zip

    Automatically. Flowchart 49 programming languages with one program: ABAP, ActionScript, Ada, ASP, assembler, AutoIt, BASIC, Batch files, C, C++, C#, Clipper, COBOL, ColdFusion, Delphi, Fortran, GW-...

    BDU_v2.1.2019.024b.zip

    Automatically Check/Download the Latest Clover Rev. and Use Zip and LZMA archives in Local Repository with existing Clover Rev, Download files from User Download List and BDU Additional Download List,...

    ZendFramework中文文档

    10.8.6. Cascading Write Operations 10.8.6.1. Notes Regarding Cascading Operations 11. Zend_Debug 11.1. 输出变量的值 (Dumping Variables) 12. Zend_Exception 12.1. 使用“异常” 13. Zend_Feed 13.1. ...

Global site tag (gtag.js) - Google Analytics