lib/rouge/lexers/shell.rb in rouge-4.1.0 vs lib/rouge/lexers/shell.rb in rouge-4.1.1

- old
+ new

@@ -7,18 +7,22 @@ title "shell" desc "Various shell languages, including sh and bash" tag 'shell' aliases 'bash', 'zsh', 'ksh', 'sh' - filenames '*.sh', '*.bash', '*.zsh', '*.ksh', '.bashrc', '.zshrc', - '.kshrc', '.profile', 'APKBUILD', 'PKGBUILD', '*.ebuild', + filenames '*.sh', '*.bash', '*.zsh', '*.ksh', '.bashrc', + '.kshrc', '.profile', + '.zshenv', '.zprofile', '.zshrc', '.zlogin', '.zlogout', + 'zshenv', 'zprofile', 'zshrc', 'zlogin', 'zlogout', + 'APKBUILD', 'PKGBUILD', '*.ebuild', '*.eclass', '*.exheres-0', '*.exlib' mimetypes 'application/x-sh', 'application/x-shellscript', 'text/x-sh', 'text/x-shellscript' def self.detect?(text) return true if text.shebang?(/(ba|z|k)?sh/) + return true if text.start_with?('#compdef', '#autoload') end KEYWORDS = %w( if fi else while do done for then return function select continue until esac elif in