unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Highlight awk syntax in bash files
@ 2023-02-14  6:30 goncholden
  2023-02-14 15:50 ` Yuri Khan
  0 siblings, 1 reply; 3+ messages in thread
From: goncholden @ 2023-02-14  6:30 UTC (permalink / raw)
  To: emacs-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 543 bytes --]

I have seen that using bask with a call to awk code does not colour highlight the awk syntax.

It would be highly desirable if emacs could also highlight the awk code enclosed in single quotes.

prax ()
{
## Print coloured function controls

awk -v fgb="$blu" -v fgw="$wht" -v rst="$sgr" \
'BEGIN {
"tput sgr0" |& getline sgr
"tput bold; tput setaf 15" |& getline wht
"tput bold; tput setaf 39" |& getline blu
}
/Code:$/ { kl=1 ; next }
!NF { kl=0 }
kl { printf("%s%s%s\n", blu, $0, sgr) }
!kl { printf("%s%s%s\n", wht, $0, sgr) }
' <<< "$@"
}

[-- Attachment #2: Type: text/html, Size: 2696 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-15  4:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-14  6:30 Highlight awk syntax in bash files goncholden
2023-02-14 15:50 ` Yuri Khan
2023-02-15  4:03   ` goncholden

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).