Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alias with whitespace in fish shell

Tags:

fish

I would like to add an alias with a whitespace in fish, like so:

alias hello there 'print hello there'

Is this in any way possible? (I know this example is invalid, I'm just giving an example).

Thanks in advance.

like image 805
Albert H Avatar asked Oct 28 '25 09:10

Albert H


1 Answers

This is currently not possible with fish's alias wrapper function.

However, what that ends up doing anyway is defining a function, so you could just do that.

function "hello there"
    echo hello there
end

Execute with "hello there" or hello\ there.

like image 99
faho Avatar answered Oct 31 '25 11:10

faho