Autocompletition fails when calling emacs with a non-existent file
When I try to open a file with emacs and that file does not exist a rather long error message gets printed when I try to do autocompletition by pressing TAB:
$ fish -v fish, version 2.0.0 $ mkdir foo; cd foo; du 0 . $ emacs x
...or any other character and then I press TAB for autocompletition
switch: Expected exactly one argument, got 0 /usr/local/Cellar/fishfish/OpenBeta_r2/share/fish/functions/__fish_filter_mime.fish (line 17): switch $mime[$i] ^ in function '__fish_filter_mime', called on line 3 of file '/usr/local/Cellar/fishfish/OpenBeta_r2/share/fish/functions/__fish_complete_mime.fish', with parameter list 'text/*' in command substitution called on line 11 of file '/usr/local/Cellar/fishfish/OpenBeta_r2/share/fish/functions/__fish_complete_mime.fish', in function '__fish_complete_mime', called on standard input, with parameter list 'text/*' in command substitution called on standard input, switch − switch ‐ conditionally execute a block of commands switch ‐ conditionally execute a block of commands Synopsis switch VALUE; [case [WILDCARD...]; [COMMANDS...]; ...] end switch: Type 'help switch' for related documentation switch: Expected exactly one argument, got 0 /usr/local/Cellar/fishfish/OpenBeta_r2/share/fish/functions/__fish_filter_mime.fish (line 17): switch $mime[$i] ^ in function '__fish_filter_mime', called on line 3 of file '/usr/local/Cellar/fishfish/OpenBeta_r2/share/fish/functions/__fish_complete_mime.fish', with parameter list 'text/*' in command substitution called on line 11 of file '/usr/local/Cellar/fishfish/OpenBeta_r2/share/fish/functions/__fish_complete_mime.fish', in function '__fish_complete_mime', called on standard input, with parameter list 'text/*' in command substitution called on standard input, switch − switch ‐ conditionally execute a block of commands switch ‐ conditionally execute a block of commands Synopsis switch VALUE; [case [WILDCARD...]; [COMMANDS...]; ...] end switch: Type 'help switch' for related documentation
If the file exists, no error gets printed. If I use any other program (like "touch" for example) no error occurs. I have only observed this with emacs. I'm using version 24.2.1. As you can see in the error messages I'm on OS X and using the latest fishfish formula from brew.