From 752af338ccfcc5af6d3822c658c7e65d94f4a6f9 Mon Sep 17 00:00:00 2001 From: Zhiming Wang Date: Sat, 17 Dec 2016 02:48:58 -0500 Subject: [PATCH] googler: underline autocorrected keyword(s) --- googler | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/googler b/googler index 1768017..2fc3e68 100755 --- a/googler +++ b/googler @@ -1794,8 +1794,14 @@ class GooglerCmd(object): self.fetch() colors = self.colors if self._autocorrected_to: + if colors: + # Underline the keywords + print('hi') + autocorrected_to = '\x1b[4m' + self._autocorrected_to + '\x1b[24m' + else: + autocorrected_to = self._autocorrected_to autocorrect_info = ('Showing results for %s; enter "exact" for an exact search.' % - self._autocorrected_to) + autocorrected_to) printerr('') if colors: printerr(colors.prompt + autocorrect_info + colors.reset)