Removing trailing slashes as explained here: http://superuser.com/questi...

...ons/564716/bash-completion-for-filename-patterns-or-directories