Enable 'sh-mode' for files created by Bash 'fc' command

* lisp/files.el (auto-mode-alist): Recognize bash-fc.XXXX files.
(Bug#73380)
This commit is contained in:
shynur 2024-09-20 12:15:06 +00:00 committed by Eli Zaretskii
parent 9c994537cf
commit c12cb25199

View file

@ -2998,6 +2998,9 @@ since only a single case-insensitive search through the alist is made."
("\\.scm\\.[0-9]*\\'" . scheme-mode)
("\\.[ckz]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode)
("\\.bash\\'" . sh-mode)
;; Bash builtin 'fc' creates a temp file named "bash-fc.XXXXXX"
;; to edit shell commands from its history list.
("/bash-fc\\.[0-9A-Za-z]\\{6\\}\\'" . sh-mode)
("/PKGBUILD\\'" . sh-mode)
("\\(/\\|\\`\\)\\.\\(bash_\\(profile\\|history\\|log\\(in\\|out\\)\\)\\|z?log\\(in\\|out\\)\\)\\'" . sh-mode)
("\\(/\\|\\`\\)\\.\\(shrc\\|zshrc\\|m?kshrc\\|bashrc\\|t?cshrc\\|esrc\\)\\'" . sh-mode)