This answer is migrated from the comment area.
fish's alias
is only a naive function for familiarity that creates functions with this name (and through eval
), and it's not surprising to find it buggy. I think you'd better learn how to write fish functions.
For your example given, it is converted this line of eval
:
function myfile --wraps /home/ben/test; /home/ben/test case/myfile $argv; end
Therefore using alias myfile="'/home/ben/test case/myfile'"
won't help too, as it gives some stupid output like --wraps 'home/ben/test; '/home/ben/test case/myfile'
(look at that lonely single quote!)
So write a function yourself, and you will find fish is such nonsense that is ruins the interactive fun and the friendliness:
function myfile --wraps '/home/ben/test case/myfile'; '/home/ben/test case/myfile' $argv; end
Note that I haven't really tested this, and it only works if I got the idea of the syntax right.
And actually I have got enough of the f??????-id??tic-shell
in 40 minutes when I read through it's built-in functions the first time.
alias
is only a naive function for familiarity that creates functions with this name (and througheval
!), and it's not surprising to find it buggy. github.com/fish-shell/fish-shell/blob/master/share/functions/… I think you'd better learn how to write fish functions, although that is neither friendly nor quite suitable for interactive fun.