After some reseach, it seems that there are two upcoming features in fish, neither of which is in the current stable release (2.1.1).
The first is a --wraps
argument to function
and complete
, which enables completion inheritance. function foo --wraps=bar
gives foo
all completions registered for bar
.
The second is abbreviations through the abbr
command, which work much like vim abbreviations. abbr -a gco='git checkout'
registers an abbreviation gco
to expand to git checkout
. Typing gco
followed by a space or enter expands the abbreviation, which naturally allows for any registered completion to work.
Without either of these features, the only remaining thing to do is to write a custom completion script for your function/alias, which is silly.