1function __fish_seen_ebuild_arg -d "Test if an ebuild-argument has been given in the current commandline" 2 commandline -opc | string match -q '*.ebuild' 3end 4 5## Opts 6complete -c ebuild -l debug -d "Run bash with the -x option" 7complete -c ebuild -l color -d "Enable color" \ 8 -xa "y n" 9complete -c ebuild -l force -d "Force regeneration of digests" 10complete -c ebuild -l ignore-default-opts -d "Ignore EBUILD_DEFAULT_OPTS" 11complete -c ebuild -l skip-manifest -d "Skip all manifest checks" 12 13## Subcommands 14complete -c ebuild -n __fish_seen_ebuild_arg -xa help -d "Show help" 15complete -c ebuild -n __fish_seen_ebuild_arg -xa pretend -d "Run pkg_pretend()" 16complete -c ebuild -n __fish_seen_ebuild_arg -xa setup -d "Run setup and system checks" 17complete -c ebuild -n __fish_seen_ebuild_arg -xa clean -d "Clean build dir" 18complete -c ebuild -n __fish_seen_ebuild_arg -xa fetch -d "Fetches all files from SRC_URI" 19#complete -c ebuild -n '__fish_seen_ebuild_arg' -xa 'digest' -d "Deprecared: see manifest" 20complete -c ebuild -n __fish_seen_ebuild_arg -xa manifest -d "Update pkg manifest" 21complete -c ebuild -n __fish_seen_ebuild_arg -xa unpack -d "Extracts sources" 22complete -c ebuild -n __fish_seen_ebuild_arg -xa prepare -d "Run src_prepare()" 23complete -c ebuild -n __fish_seen_ebuild_arg -xa configure -d "Run src_configure()" 24complete -c ebuild -n __fish_seen_ebuild_arg -xa compile -d "Run src_compile()" 25complete -c ebuild -n __fish_seen_ebuild_arg -xa test -d "Run tests" 26complete -c ebuild -n __fish_seen_ebuild_arg -xa preinst -d "Run pkg_preinst()" 27complete -c ebuild -n __fish_seen_ebuild_arg -xa install -d "Run src_install()" 28complete -c ebuild -n __fish_seen_ebuild_arg -xa postinst -d "Run pkg_postinst()" 29complete -c ebuild -n __fish_seen_ebuild_arg -xa qmerge -d "Install files to live filesystem" 30complete -c ebuild -n __fish_seen_ebuild_arg -xa merge -d "Run fetch, unpack, compile, install and qmerge" 31complete -c ebuild -n __fish_seen_ebuild_arg -xa unmerge -d "Uninstall files from live filesystem" 32complete -c ebuild -n __fish_seen_ebuild_arg -xa prerm -d "Run pkg_prerm()" 33complete -c ebuild -n __fish_seen_ebuild_arg -xa postrm -d "Run pkg_postrm()" 34complete -c ebuild -n __fish_seen_ebuild_arg -xa config -d "Run post-install configuration" 35complete -c ebuild -n __fish_seen_ebuild_arg -xa package -d "Create a binpkg in PKGDIR" 36complete -c ebuild -n __fish_seen_ebuild_arg -xa rpm -d "Builds a RedHat RPM pkg" 37