1

OS: Ubuntu 18.04 or Kubuntu 18.04.

I have Gedit 3.28.1 on both systems. While looking at .bashrc or /etc/skel/.bashrc, I found an instance of "bracket match not found" as shown in the image below in both Ubuntu and Kubuntu:

Bracket match not found

Note that Gedit uses the same phrase for (), [], and {}

Line 97 (as in a default .bashrc) is this:

alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

While the first instance is matched correctly (not shown in the image):

([ $? = 0 ] && echo terminal || echo error)

the second isn't:

(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')

The complete line is this:

alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

Mousepad 0.4 also doesn't match the second instance whereas Geany 1.32 and Kate 17.12.3 do.

Do I need to install something to get Gedit and Mousepad to fix the "bracket match not found"? Or is it an issue with the algorithm used by these two text editors?

DK Bose
  • 41,240
  • 22
  • 121
  • 214
  • `emacs`, in `Shell-script[bash]` mode, has no trouble with the `alias alert` line. As for the "algorithm used by these two text editors", `apt-get source kate` will download the source so you can look at the algorithm – waltinator Jan 20 '19 at 04:54
  • 1
    FWIW, `alert` is a mess, and it's much cleaner to rewrite it [as a function](https://gist.github.com/wjandrea/1d1aa893414bf4e4dbe230cd6b42fac0). – wjandrea Jan 23 '19 at 16:38

0 Answers0