expand the given pattern in native and gnome-recents-documents completers to work correctly with '~/'
pep8 compliance modifications