以下の内容はhttps://iww.hateblo.jp/entry/20240221/cygwinより取得しました。


Cygwinで、コマンドラインでtabを押したときのファイル名補完で .exe が表示されない

Cygwinで hello.exe を実行するときに、 bash上で ./he まで入力してtabを押しても ./hello で止まってしまって ./hello.exe とならない。
コマンドの引数のときの補完では ちゃんと hello.exe まで出る。
別に ./hello で普通に実行できるからいいんだけど、気分は良くない。


調べたところ、 shopt に completion_strip_exe というexeを非表示にできるオプションがあるらしい。

$ man bash
。。。
      completion_strip_exe
              If set, whenever bash sees foo.exe during completion, it
              checks if foo is the same file and strips the suffix.

これがデフォルトで有効になっていたので、.bashrc で無効にして解決した。

shopt -u completion_strip_exe


どうも海外のサイトを見ていると、これは大いに受け入れられているらしい。
どこをみても「.exeつかなくなった!やったぜ」的な反応ばっかりでビビった




以上の内容はhttps://iww.hateblo.jp/entry/20240221/cygwinより取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14