Skip to content

Commit

Permalink
fix: bat language highlighting for '.zshrc'
Browse files Browse the repository at this point in the history
  • Loading branch information
LangLangBart committed Jul 13, 2023
1 parent 7081c0b commit ad530e0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gh-find-code
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ view_contents() {

# check if the file does have a file extension and assign it
[[ $file_name =~ \.[[:alnum:]]+$ ]] && file_extension="${file_name##*.}"
# covers cases where the filename starts with a dot, for example '.zshrc'
[[ $file_name == ".${file_extension}" ]] && file_extension="$file_name"

# strings containing operators like '*' or '+' need to be escaped, but keep the "|"
# character unescaped
Expand Down

0 comments on commit ad530e0

Please sign in to comment.