This is an exceptionally old question, but for future readers who stumble across this, the fish shell equivalent of bash's compgen
builtin is complete -C
. With -C/--do-complete
option, complete
will attempt to find all possible completions for the string specified immediately following -C
, and, naturally, if you do not provide any additional characters after the -C
, complete
will, "... try to find all possible completions for the current command line buffer."
You can read about the the complete
command and all of its options on the Fish Shell documentation page for this command.
Source: Fish Shell GitHub Issue #2105