metti/command-not-found — pull request #3 by Chionsas (2013-10-27 18:12:28+00:00)
Title: Fix compliance with POSIX shells

cnf.sh breaks GDM's session init script (and maybe other sh scripts) when [Dash](https://wiki.archlinux.org/index.php/Dash) is used for /bin/sh.
It is usually sourced from /etc/gdm/Xsession -> /etc/profile -> /etc/profile.d/cnf.sh.
(/etc/gdm/Xsession has #!/bin/sh for the header)
The breakage is due to cnf.sh using a POSIX-incompatible "function" bashism: https://wiki.ubuntu.com/DashAsBinSh#function

Simply removing the "function" keyword fixes the problem.
No regressions are introduced.