Commit f5a9393d authored by Vincent Aranega's avatar Vincent Aranega

Enhanced font detection for terminology

As 'grep -B' is a GNU extension, a more portable solution is preferable. The most direct and simple solution would be using 'awk': awk '/^font.name$/{print a}{a=$0}' But a sed solution could also be applied: sed -n '/^font\.name$/{g;1!p;};h'
parent 90c46651
......@@ -1816,7 +1816,7 @@ gettermfont () {
;;
"terminology")
termfont="$(strings ${XDG_CONFIG_HOME}/terminology/config/standard/base.cfg | grep -B1 font.name | head -1)"
termfont="$(strings ${XDG_CONFIG_HOME}/terminology/config/standard/base.cfg | awk '/^font.name$/{print a}{a=$0}')"
termfont="${termfont/.pcf}"
termfont="${termfont/:*}"
;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment