function __fish_pyenv
  pyenv commands
end

complete -f -c pyenv -a '(__fish_pyenv)'

function __fish_pyenv_needs_command
  set cmd (commandline -opc)
  if [ (count $cmd) -eq 1 -a $cmd[1] = 'pyenv' ]
    return 0
  end
  return 1
end

function __fish_pyenv_using_command
  set cmd (commandline -opc)
  if [ (count $cmd) -gt 1 ]
    if [ $argv[1] = $cmd[2] ]
      return 0
    end
  end
  return 1
end

complete -f -c pyenv -n '__fish_pyenv_needs_command' -a '(pyenv commands)'
for cmd in (pyenv commands)
  complete -f -c pyenv -n "__fish_pyenv_using_command $cmd" -a "(pyenv completions $cmd)"
end

Implement sub-command completion for fish shell
Implement sub-command completion for fish shell

zmwangx/pyenv,BanzaiMan/pyenv,sebhahn/pyenv,kevinburke/pyenv,obimod/pyenv,hlecuanda/pyenv,syndbg/goenv,sebhahn/pyenv,pyenv/pyenv,takluyver/pyenv,chenfengyuan/pyenv,pyenv/pyenv,xshwy/pyenv,lepture/pyenv,VShangxiao/pyenv,sebhahn/pyenv,rowhit/pyenv,hlecuanda/pyenv,habinmusic/pyenv,recruit-mtl/pyenv,dongguangming/pyenv,blueyed/pyenv,obimod/pyenv,fly19890211/pyenv,yeonsh/pyenv,habinmusic/pyenv,genome-vendor/pyenv,recruit-mtl/pyenv,yyuu/pyenv,kevinburke/pyenv,yyuu/pyenv,UCASREN/pyenv,lozybean/pyenv,cehoffman/pyenv,BanzaiMan/pyenv,genome-vendor/pyenv,UCASREN/pyenv,syndbg/goenv,pyenv/pyenv,fly19890211/pyenv,yeonsh/pyenv,VShangxiao/pyenv,lozybean/pyenv,dnsd/pyenv,syndbg/goenv,dongguangming/pyenv,zmwangx/pyenv,dnsd/pyenv,takluyver/pyenv,syndbg/goenv,xshwy/pyenv,chenfengyuan/pyenv,rowhit/pyenv,cehoffman/pyenv,lepture/pyenv