|
|
|
|
|
by egonschiele
5119 days ago
|
|
Very poor support for alias: batman@batman ~/D/S/rails> alias foo="cd ~/"
fish: Could not expand string '$tmp[2]'
/usr/local/share/fish/functions/alias.fish (line 19): set body $tmp[2]
^
in function 'alias',
called on standard input,
with parameter list 'foo=cd ~/'
Makes me wonder what else I'll have to relearn to use fish. Can someone tell me if it's worth the effort?Edit: didn't take me long to find something worse. I defined my aliases as functions, but apparently fish executes all functions when it sources the file? By putting this function in: function foo
cd ~/
end
I was able to send fish into an infinite loop. |
|
fish doesn't have aliases, only functions. 'alias' is itself a function, which looks like it has a bug. I filed https://github.com/ridiculousfish/fishfish/issues/48 to track this.
(The usual way a fish user would add this function would be to put a file 'foo.fish' in ~/.config/fish/functions, or to use 'funced fish' to create one interactively.)
As for your infinite loop - fish certainly does not execute all functions when it sources the file. I wasn't able to reproduce your problem. Can you explain how you added this function?
Thanks!