- the currently edited word should be omitted when removing duplicate completion suggestions, which is not necessarily the last word - when using "compgen", mark "$cur" as non-option argument - some formatting cleanup