feat: add shell dotfile extensions to source file detection

This commit is contained in:
Paul Gauthier (aider) 2024-12-07 07:54:20 -08:00
parent 33d77f4355
commit 4c77d0509a

View file

@ -10,7 +10,6 @@ from watchfiles import watch
from aider.dump import dump # noqa
# add .zsh, .zshrc. and the various dotfiles for bash, etc ai!
def is_source_file(path: Path) -> bool:
"""
Check if a file is a source file that uses # or // style comments.
@ -25,6 +24,16 @@ def is_source_file(path: Path) -> bool:
".pm",
".sh",
".bash",
".zsh",
".bashrc",
".bash_profile",
".bash_login",
".bash_logout",
".zshrc",
".zprofile",
".zlogin",
".zlogout",
".profile",
".yaml",
".yml",
# // style comments