shopt cmd list

Table 14.11. The shopt Command Options

Option

Meaning

cdable_vars

If an argument to the cd built-in command is not a directory, it is assumed to be the name of a variable whose value is the directory to change to.

cdspell

Corrects minor errors in the spelling of a directory name in a cd command. The errors checked for are transposed characters, a missing character, and a character too many. If a correction is found, the corrected path is printed, and the command proceeds. Only used by interactive shells.

checkhash

Bash checks that a command found in the hash table exists before trying to execute it. If a hashed command no longer exists, a normal path search is performed.

checkwinsize

Bash checks the window size after each command and, if necessary, updates the values of LINES and COLUMNS.

cmdhist

Bash attempts to save all lines of a multiple-line command in the same history entry. This allows easy re-editing of multiline commands.

dotglob

Bash includes filenames beginning with a dot (.) in the results of filename expansion.

execfail

A noninteractive shell will not exit if it cannot execute the file specified as an argument to the exec built-in command. An interactive shell does not exit if exec fails.

expand_aliases

Aliases are expanded. Enabled by default.

extglob

The extended pattern matching features (regular expression metacharacters derived from Korn shell for filename expansion) are enabled.

histappend

The history list is appended to the file named by the value of the HISTFILE variable when the shell exits, rather than overwriting the file.

histreedit

If readline is being used, a user is given the opportunity to re-edit a failed history substitution.

histverify

If set, and readline is being used, the results of history substitution are not immediately passed to the shell parser. Instead, the resulting line is loaded into the readline editing buffer, allowing further modification.

hostcomplete

If set, and readline is being used, bash will attempt to perform hostname completion when a word containing an @ is being completed. Enabled by default.

huponexit

If set, bash will send SIGHUP (hangup signal) to all jobs when an interactive login shell exits.

interactive_comments

Allows a word beginning with # to cause that word and all remaining characters on that line to be ignored in an interactive shell. Enabled by default.

lithist

If enabled, and the cmdhist option is enabled, multiline commands are saved to the history with embedded newlines rather than using semicolon separators where possible.

mailwarn

If set, and a file that bash is checking for mail has been accessed since the last time it was checked, the message The mail in mailfile has been read is displayed.

nocaseglob

If set, bash matches filenames in a case-insensitive fashion when performing filename expansion.

nullglob

If set, bash allows filename patterns that match no files to expand to a null string, rather than themselves.

promptvars

If set, prompt strings undergo variable and parameter expansion after being expanded. Enabled by default.

restricted_shell

The shell sets this option if it is started in restricted mode. The value may not be changed. This is not reset when the startup files are executed, allowing the startup files to discover whether or not a shell is restricted.

shift_verbose

If this is set, the shift built-in prints an error message when the shift count exceeds the number of positional parameters.

sourcepath

If set, the source built-in uses the value of PATH to find the directory containing the file supplied as an argument. Enabled by default.

source

A synonym for dot (.).

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值