Bash > shoptによる設定

更新日 2015-01-15
広告
shoptコマンドを使うことで、bashの各機能のon/offが可能です。

機能の一覧表示

単に shopt と入力すると、機能とon/off状態の一覧が表示されます。
$ shopt
autocd         off
cdable_vars    off
cdspell        off
checkhash      off
checkjobs      off
checkwinsize   on
cmdhist        on

機能の有効化(on)

ある機能を有効にするには、-sオプションを使います。
$ shopt -s autocd

機能の無効化(off)

ある機能を無効にするには、-uオプションを使います。
$ shopt -u autocd

progcomp機能

progcompは、よく使われるプログラム(コマンド)に特化した補完を行ってくれる機能です。 自分で作成したプログラムなどを実行するときに、上手くファイル名が補完されない場合は、progcompをoffにしてみましょう。
$ shopt -u progcomp
広告
お問い合わせは sweng.tips@gmail.com まで。
inserted by FC2 system