From e923bf36d3f37b627828a7360d2f5e31b0075193 Mon Sep 17 00:00:00 2001 From: TheFox0x7 Date: Thu, 3 Jul 2025 23:03:01 +0200 Subject: [PATCH 01/15] hide internal commands --- cmd/hook.go | 1 + cmd/keys.go | 1 + cmd/serv.go | 1 + 3 files changed, 3 insertions(+) diff --git a/cmd/hook.go b/cmd/hook.go index 2ce272b411e07..8727346422415 100644 --- a/cmd/hook.go +++ b/cmd/hook.go @@ -32,6 +32,7 @@ var ( CmdHook = &cli.Command{ Name: "hook", Usage: "(internal) Should only be called by Git", + Hidden: true, //internal commands shouldn't be visible Description: "Delegate commands to corresponding Git hooks", Before: PrepareConsoleLoggerLevel(log.FATAL), Commands: []*cli.Command{ diff --git a/cmd/keys.go b/cmd/keys.go index 8710756a8136b..67064cc57c60c 100644 --- a/cmd/keys.go +++ b/cmd/keys.go @@ -19,6 +19,7 @@ import ( var CmdKeys = &cli.Command{ Name: "keys", Usage: "(internal) Should only be called by SSH server", + Hidden: true, //internal commands shouldn't not be visible Description: "Queries the Gitea database to get the authorized command for a given ssh key fingerprint", Before: PrepareConsoleLoggerLevel(log.FATAL), Action: runKeys, diff --git a/cmd/serv.go b/cmd/serv.go index 8c6001e7274c6..a1a6328a7e8af 100644 --- a/cmd/serv.go +++ b/cmd/serv.go @@ -41,6 +41,7 @@ var CmdServ = &cli.Command{ Name: "serv", Usage: "(internal) Should only be called by SSH shell", Description: "Serv provides access auth for repositories", + Hidden: true, //Internal commands shouldn't be visible in help Before: PrepareConsoleLoggerLevel(log.FATAL), Action: runServ, Flags: []cli.Flag{ From 0ccd0ac95a74a227de94d5f2c9fe3ea02cd11e4e Mon Sep 17 00:00:00 2001 From: TheFox0x7 Date: Fri, 4 Jul 2025 17:43:12 +0200 Subject: [PATCH 02/15] refactor flag setup to before since flags aren't marked as local they cascade through the app so before can be used as setup as we need to define flags once. --- cmd/main.go | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index 3b8a8a931162b..46906698b7599 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -77,20 +77,12 @@ func appGlobalFlags() []cli.Flag { func prepareSubcommandWithGlobalFlags(command *cli.Command) { command.Flags = append(append([]cli.Flag{}, appGlobalFlags()...), command.Flags...) - command.Action = prepareWorkPathAndCustomConf(command.Action) - command.HideHelp = true - if command.Name != "help" { - command.Commands = append(command.Commands, cmdHelp()) - } - for i := range command.Commands { - prepareSubcommandWithGlobalFlags(command.Commands[i]) - } + command.Before = prepareWorkPathAndCustomConf() } // prepareWorkPathAndCustomConf wraps the Action to prepare the work path and custom config -// It can't use "Before", because each level's sub-command's Before will be called one by one, so the "init" would be done multiple times -func prepareWorkPathAndCustomConf(action cli.ActionFunc) func(context.Context, *cli.Command) error { - return func(ctx context.Context, cmd *cli.Command) error { +func prepareWorkPathAndCustomConf() cli.BeforeFunc { + return func(ctx context.Context, cmd *cli.Command) (context.Context, error) { var args setting.ArgWorkPathAndCustomConf // from children to parent, check the global flags for _, curCtx := range cmd.Lineage() { @@ -105,11 +97,7 @@ func prepareWorkPathAndCustomConf(action cli.ActionFunc) func(context.Context, * } } setting.InitWorkPathAndCommonConfig(os.Getenv, args) - if cmd.Bool("help") || action == nil { - // the default behavior of "urfave/cli": "nil action" means "show help" - return cmdHelp().Action(ctx, cmd) - } - return action(ctx, cmd) + return ctx, nil } } @@ -158,7 +146,6 @@ func NewMainApp(appVer AppVersion) *cli.Command { app.Flags = append(app.Flags, cli.VersionFlag) app.Flags = append(app.Flags, appGlobalFlags()...) - app.HideHelp = true // use our own help action to show helps (with more information like default config) app.Before = PrepareConsoleLoggerLevel(log.INFO) for i := range subCmdWithConfig { prepareSubcommandWithGlobalFlags(subCmdWithConfig[i]) From 0e5f67856236ab08efab505ab6305ece5325a879 Mon Sep 17 00:00:00 2001 From: TheFox0x7 Date: Sat, 5 Jul 2025 00:04:01 +0200 Subject: [PATCH 03/15] simplify custom help command only main and it's subcommands are directly handled by it --- cmd/main.go | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index 46906698b7599..e7f97572c1e8c 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -7,6 +7,7 @@ import ( "context" "fmt" "os" + "slices" "strings" "code.gitea.io/gitea/modules/log" @@ -24,17 +25,13 @@ func cmdHelp() *cli.Command { Usage: "Shows a list of commands or help for one command", ArgsUsage: "[command]", Action: func(ctx context.Context, c *cli.Command) (err error) { - lineage := c.Lineage() // The order is from child to parent: help, doctor, Gitea - targetCmdIdx := 0 - if c.Name == "help" { - targetCmdIdx = 1 - } - if lineage[targetCmdIdx] != lineage[targetCmdIdx].Root() { - err = cli.ShowCommandHelp(ctx, lineage[targetCmdIdx+1] /* parent cmd */, lineage[targetCmdIdx].Name /* sub cmd */) + if !c.Args().Present() { + err = cli.ShowAppHelp(c.Root()) } else { - err = cli.ShowAppHelp(c) + err = cli.ShowCommandHelp(ctx, c.Root(), c.Args().First()) } - _, _ = fmt.Fprintf(c.Root().Writer, ` + if err == nil { + _, _ = fmt.Fprintf(c.Root().Writer, ` DEFAULT CONFIGURATION: AppPath: %s WorkPath: %s @@ -42,6 +39,7 @@ DEFAULT CONFIGURATION: ConfigFile: %s `, setting.AppPath, setting.AppWorkPath, setting.CustomPath, setting.CustomConf) + } return err }, } @@ -76,7 +74,7 @@ func appGlobalFlags() []cli.Flag { } func prepareSubcommandWithGlobalFlags(command *cli.Command) { - command.Flags = append(append([]cli.Flag{}, appGlobalFlags()...), command.Flags...) + command.Flags = slices.Concat(appGlobalFlags(), command.Flags) command.Before = prepareWorkPathAndCustomConf() } From 73f8df74b6eaf10ca7546c8a36171fbeb81961a7 Mon Sep 17 00:00:00 2001 From: TheFox0x7 Date: Sat, 5 Jul 2025 20:39:26 +0200 Subject: [PATCH 04/15] use global flags instead of looping though the flags in linage, use their non local property --- cmd/main.go | 69 ++++++++++++++++++++--------------------------------- 1 file changed, 26 insertions(+), 43 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index e7f97572c1e8c..823eac4cef358 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -7,7 +7,6 @@ import ( "context" "fmt" "os" - "slices" "strings" "code.gitea.io/gitea/modules/log" @@ -46,35 +45,7 @@ DEFAULT CONFIGURATION: return c } -func appGlobalFlags() []cli.Flag { - return []cli.Flag{ - // make the builtin flags at the top - cli.HelpFlag, - - // shared configuration flags, they are for global and for each sub-command at the same time - // eg: such command is valid: "./gitea --config /tmp/app.ini web --config /tmp/app.ini", while it's discouraged indeed - // keep in mind that the short flags like "-C", "-c" and "-w" are globally polluted, they can't be used for sub-commands anymore. - &cli.StringFlag{ - Name: "custom-path", - Aliases: []string{"C"}, - Usage: "Set custom path (defaults to '{WorkPath}/custom')", - }, - &cli.StringFlag{ - Name: "config", - Aliases: []string{"c"}, - Value: setting.CustomConf, - Usage: "Set custom config file (defaults to '{WorkPath}/custom/conf/app.ini')", - }, - &cli.StringFlag{ - Name: "work-path", - Aliases: []string{"w"}, - Usage: "Set Gitea's working path (defaults to the Gitea's binary directory)", - }, - } -} - func prepareSubcommandWithGlobalFlags(command *cli.Command) { - command.Flags = slices.Concat(appGlobalFlags(), command.Flags) command.Before = prepareWorkPathAndCustomConf() } @@ -82,17 +53,14 @@ func prepareSubcommandWithGlobalFlags(command *cli.Command) { func prepareWorkPathAndCustomConf() cli.BeforeFunc { return func(ctx context.Context, cmd *cli.Command) (context.Context, error) { var args setting.ArgWorkPathAndCustomConf - // from children to parent, check the global flags - for _, curCtx := range cmd.Lineage() { - if curCtx.IsSet("work-path") && args.WorkPath == "" { - args.WorkPath = curCtx.String("work-path") - } - if curCtx.IsSet("custom-path") && args.CustomPath == "" { - args.CustomPath = curCtx.String("custom-path") - } - if curCtx.IsSet("config") && args.CustomConf == "" { - args.CustomConf = curCtx.String("config") - } + if cmd.IsSet("work-path") { + args.WorkPath = cmd.String("work-path") + } + if cmd.IsSet("custom-path") { + args.CustomPath = cmd.String("custom-path") + } + if cmd.IsSet("config") { + args.CustomConf = cmd.String("config") } setting.InitWorkPathAndCommonConfig(os.Getenv, args) return ctx, nil @@ -111,7 +79,24 @@ func NewMainApp(appVer AppVersion) *cli.Command { app.Description = `Gitea program contains "web" and other subcommands. If no subcommand is given, it starts the web server by default. Use "web" subcommand for more web server arguments, use other subcommands for other purposes.` app.Version = appVer.Version + appVer.Extra app.EnableShellCompletion = true - + app.Flags = []cli.Flag{ + &cli.StringFlag{ + Name: "custom-path", + Aliases: []string{"C"}, + Usage: "Set custom path (defaults to '{WorkPath}/custom')", + }, + &cli.StringFlag{ + Name: "config", + Aliases: []string{"c"}, + Value: setting.CustomConf, + Usage: "Set custom config file (defaults to '{WorkPath}/custom/conf/app.ini')", + }, + &cli.StringFlag{ + Name: "work-path", + Aliases: []string{"w"}, + Usage: "Set Gitea's working path (defaults to the Gitea's binary directory)", + }, + } // these sub-commands need to use config file subCmdWithConfig := []*cli.Command{ cmdHelp(), // the "help" sub-command was used to show the more information for "work path" and "custom config" @@ -142,8 +127,6 @@ func NewMainApp(appVer AppVersion) *cli.Command { // but not sure whether it would break Windows users who used to double-click the EXE to run. app.DefaultCommand = CmdWeb.Name - app.Flags = append(app.Flags, cli.VersionFlag) - app.Flags = append(app.Flags, appGlobalFlags()...) app.Before = PrepareConsoleLoggerLevel(log.INFO) for i := range subCmdWithConfig { prepareSubcommandWithGlobalFlags(subCmdWithConfig[i]) From 829f53de80605b37dde961bde9da4c3e7f83e3c4 Mon Sep 17 00:00:00 2001 From: TheFox0x7 Date: Sat, 5 Jul 2025 20:39:32 +0200 Subject: [PATCH 05/15] fix formatting --- cmd/hook.go | 2 +- cmd/keys.go | 2 +- cmd/serv.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/hook.go b/cmd/hook.go index 8727346422415..b741127ca3c17 100644 --- a/cmd/hook.go +++ b/cmd/hook.go @@ -32,7 +32,7 @@ var ( CmdHook = &cli.Command{ Name: "hook", Usage: "(internal) Should only be called by Git", - Hidden: true, //internal commands shouldn't be visible + Hidden: true, // internal commands shouldn't be visible Description: "Delegate commands to corresponding Git hooks", Before: PrepareConsoleLoggerLevel(log.FATAL), Commands: []*cli.Command{ diff --git a/cmd/keys.go b/cmd/keys.go index 67064cc57c60c..5ca3b91e15e73 100644 --- a/cmd/keys.go +++ b/cmd/keys.go @@ -19,7 +19,7 @@ import ( var CmdKeys = &cli.Command{ Name: "keys", Usage: "(internal) Should only be called by SSH server", - Hidden: true, //internal commands shouldn't not be visible + Hidden: true, // internal commands shouldn't not be visible Description: "Queries the Gitea database to get the authorized command for a given ssh key fingerprint", Before: PrepareConsoleLoggerLevel(log.FATAL), Action: runKeys, diff --git a/cmd/serv.go b/cmd/serv.go index a1a6328a7e8af..38c79f68cd261 100644 --- a/cmd/serv.go +++ b/cmd/serv.go @@ -41,7 +41,7 @@ var CmdServ = &cli.Command{ Name: "serv", Usage: "(internal) Should only be called by SSH shell", Description: "Serv provides access auth for repositories", - Hidden: true, //Internal commands shouldn't be visible in help + Hidden: true, // Internal commands shouldn't be visible in help Before: PrepareConsoleLoggerLevel(log.FATAL), Action: runServ, Flags: []cli.Flag{ From 4a25324fab982b52fb6680f1da3f7c5aa932b098 Mon Sep 17 00:00:00 2001 From: TheFox0x7 Date: Sun, 6 Jul 2025 12:09:58 +0200 Subject: [PATCH 06/15] add generated autocomplete scripts for shells --- contrib/autocompletion/bash_autocomplete | 42 +- contrib/autocompletion/gitea.fish | 572 +++++++++++++++++++++++ contrib/autocompletion/zsh_autocomplete | 47 +- 3 files changed, 618 insertions(+), 43 deletions(-) create mode 100644 contrib/autocompletion/gitea.fish diff --git a/contrib/autocompletion/bash_autocomplete b/contrib/autocompletion/bash_autocomplete index 5cb62f26a71c1..dfc08b0c3e2e7 100755 --- a/contrib/autocompletion/bash_autocomplete +++ b/contrib/autocompletion/bash_autocomplete @@ -1,30 +1,34 @@ -#! /bin/bash -# Heavily inspired by https://github.com/urfave/cli +#!/bin/bash -_cli_bash_autocomplete() { +# This is a shell completion script auto-generated by https://github.com/urfave/cli for bash. + +# Macs have bash3 for which the bash-completion package doesn't include +# _init_completion. This is a minimal version of that function. +__gitea_init_completion() { + COMPREPLY=() + _get_comp_words_by_ref "$@" cur prev words cword +} + +__gitea_bash_autocomplete() { if [[ "${COMP_WORDS[0]}" != "source" ]]; then - local cur opts base + local cur opts base words COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" + if declare -F _init_completion >/dev/null 2>&1; then + _init_completion -n "=:" || return + else + __gitea_init_completion -n "=:" || return + fi + words=("${words[@]:0:$cword}") if [[ "$cur" == "-"* ]]; then - opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} ${cur} --generate-bash-completion ) + requestComp="${words[*]} ${cur} --generate-shell-completion" else - opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion ) + requestComp="${words[*]} --generate-shell-completion" fi - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + opts=$(eval "${requestComp}" 2>/dev/null) + COMPREPLY=($(compgen -W "${opts}" -- ${cur})) return 0 fi } -if [ -z "$PROG" ] && [ ! "$(command -v gitea &> /dev/null)" ] ; then - complete -o bashdefault -o default -o nospace -F _cli_bash_autocomplete gitea -elif [ -z "$PROG" ]; then - complete -o bashdefault -o default -o nospace -F _cli_bash_autocomplete ./gitea - complete -o bashdefault -o default -o nospace -F _cli_bash_autocomplete "$PWD/gitea" -else - complete -o bashdefault -o default -o nospace -F _cli_bash_autocomplete "$PROG" - unset PROG -fi - - - +complete -o bashdefault -o default -o nospace -F __gitea_bash_autocomplete gitea diff --git a/contrib/autocompletion/gitea.fish b/contrib/autocompletion/gitea.fish new file mode 100644 index 0000000000000..a6cebd82de081 --- /dev/null +++ b/contrib/autocompletion/gitea.fish @@ -0,0 +1,572 @@ +# gitea fish shell completion + +function __fish_gitea_no_subcommand --description 'Test if there has been any subcommand yet' + for i in (commandline -opc) + if contains -- $i help h web serv hook keys dump admin migrate doctor manager embedded migrate-storage dump-repo restore-repo actions cert generate docs completion + return 1 + end + end + return 0 +end + +complete -c gitea -n '__fish_gitea_no_subcommand' -f -l custom-path -s C -r -d 'Set custom path (defaults to \'{WorkPath}/custom\')' +complete -c gitea -n '__fish_gitea_no_subcommand' -f -l config -s c -r -d 'Set custom config file (defaults to \'{WorkPath}/custom/conf/app.ini\')' +complete -c gitea -n '__fish_gitea_no_subcommand' -f -l work-path -s w -r -d 'Set Gitea\'s working path (defaults to the Gitea\'s binary directory)' +complete -c gitea -n '__fish_gitea_no_subcommand' -f -l help -s h -d 'show help' +complete -c gitea -n '__fish_gitea_no_subcommand' -f -l version -s v -d 'print the version' +complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c gitea -n '__fish_seen_subcommand_from help h' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from help h; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'web' -d 'Start Gitea web server' +complete -c gitea -n '__fish_seen_subcommand_from web' -f -l port -s p -r -d 'Temporary port number to prevent conflict' +complete -c gitea -n '__fish_seen_subcommand_from web' -f -l install-port -r -d 'Temporary port number to run the install page on to prevent conflict' +complete -c gitea -n '__fish_seen_subcommand_from web' -f -l pid -s P -r -d 'Custom pid file path' +complete -c gitea -n '__fish_seen_subcommand_from web' -f -l quiet -s q -d 'Only display Fatal logging errors until logging is set-up' +complete -c gitea -n '__fish_seen_subcommand_from web' -f -l verbose -d 'Set initial logging to TRACE level until logging is properly set-up' +complete -c gitea -n '__fish_seen_subcommand_from web' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from web; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c gitea -n '__fish_seen_subcommand_from serv' -f -l enable-pprof +complete -c gitea -n '__fish_seen_subcommand_from serv' -f -l debug +complete -c gitea -n '__fish_seen_subcommand_from serv' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from serv; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c gitea -n '__fish_seen_subcommand_from hook' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from hook; and not __fish_seen_subcommand_from pre-receive update post-receive proc-receive help h' -a 'pre-receive' -d 'Delegate pre-receive Git hook' +complete -c gitea -n '__fish_seen_subcommand_from pre-receive' -f -l debug +complete -c gitea -n '__fish_seen_subcommand_from pre-receive' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from pre-receive; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from hook; and not __fish_seen_subcommand_from pre-receive update post-receive proc-receive help h' -a 'update' -d 'Delegate update Git hook' +complete -c gitea -n '__fish_seen_subcommand_from update' -f -l debug +complete -c gitea -n '__fish_seen_subcommand_from update' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from update; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from hook; and not __fish_seen_subcommand_from pre-receive update post-receive proc-receive help h' -a 'post-receive' -d 'Delegate post-receive Git hook' +complete -c gitea -n '__fish_seen_subcommand_from post-receive' -f -l debug +complete -c gitea -n '__fish_seen_subcommand_from post-receive' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from post-receive; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from hook; and not __fish_seen_subcommand_from pre-receive update post-receive proc-receive help h' -a 'proc-receive' -d 'Delegate proc-receive Git hook' +complete -c gitea -n '__fish_seen_subcommand_from proc-receive' -f -l debug +complete -c gitea -n '__fish_seen_subcommand_from proc-receive' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from proc-receive; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from hook; and not __fish_seen_subcommand_from pre-receive update post-receive proc-receive help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c gitea -n '__fish_seen_subcommand_from keys' -f -l expected -s e -r -d 'Expected user for whom provide key commands' +complete -c gitea -n '__fish_seen_subcommand_from keys' -f -l username -s u -r -d 'Username trying to log in by SSH' +complete -c gitea -n '__fish_seen_subcommand_from keys' -f -l type -s t -r -d 'Type of the SSH key provided to the SSH Server (requires content to be provided too)' +complete -c gitea -n '__fish_seen_subcommand_from keys' -f -l content -s k -r -d 'Base64 encoded content of the SSH key provided to the SSH Server (requires type to be provided too)' +complete -c gitea -n '__fish_seen_subcommand_from keys' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from keys; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'dump' -d 'Dump Gitea files and database' +complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l file -s f -r -d 'Name of the dump file which will be created, default to "gitea-dump-{time}.zip". Supply \'-\' for stdout. See type for available types.' +complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l verbose -s V -d 'Show process details' +complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l quiet -s q -d 'Only display warnings and errors' +complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l tempdir -s t -r -d 'Temporary dir path' +complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l database -s d -r -d 'Specify the database SQL syntax: sqlite3, mysql, mssql, postgres' +complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l skip-repository -s R -d 'Skip the repository dumping' +complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l skip-log -s L -d 'Skip the log dumping' +complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l skip-custom-dir -d 'Skip custom directory' +complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l skip-lfs-data -d 'Skip LFS data' +complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l skip-attachment-data -d 'Skip attachment data' +complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l skip-package-data -d 'Skip package data' +complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l skip-index -d 'Skip bleve index data' +complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l skip-db -d 'Skip database' +complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l type -r -d 'Dump output format, default to "zip", supported types: zip, tar, tar.sz, tar.gz, tar.xz, tar.bz2, tar.br, tar.lz4, tar.zst' +complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from dump; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'admin' -d 'Perform common administrative operations' +complete -c gitea -n '__fish_seen_subcommand_from admin' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from admin; and not __fish_seen_subcommand_from user repo-sync-releases regenerate auth sendmail help h' -a 'user' -d 'Modify users' +complete -c gitea -n '__fish_seen_subcommand_from user' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from user; and not __fish_seen_subcommand_from create list change-password delete generate-access-token must-change-password help h' -a 'create' -d 'Create a new user in database' +complete -c gitea -n '__fish_seen_subcommand_from create' -f -l user-type -r -d 'Set user\'s type: individual or bot' +complete -c gitea -n '__fish_seen_subcommand_from create' -f -l password -r -d 'User password' +complete -c gitea -n '__fish_seen_subcommand_from create' -f -l email -r -d 'User email address' +complete -c gitea -n '__fish_seen_subcommand_from create' -f -l admin -d 'User is an admin' +complete -c gitea -n '__fish_seen_subcommand_from create' -f -l random-password -d 'Generate a random password for the user' +complete -c gitea -n '__fish_seen_subcommand_from create' -f -l must-change-password -d 'User must change password after initial login, defaults to true for all users except the first one (can be disabled by --must-change-password=false)' +complete -c gitea -n '__fish_seen_subcommand_from create' -f -l random-password-length -r -d 'Length of the random password to be generated' +complete -c gitea -n '__fish_seen_subcommand_from create' -f -l access-token -d 'Generate access token for the user' +complete -c gitea -n '__fish_seen_subcommand_from create' -f -l access-token-name -r -d 'Name of the generated access token' +complete -c gitea -n '__fish_seen_subcommand_from create' -f -l access-token-scopes -r -d 'Scopes of the generated access token, comma separated. Examples: "all", "public-only,read:issue", "write:repository,write:user"' +complete -c gitea -n '__fish_seen_subcommand_from create' -f -l restricted -d 'Make a restricted user account' +complete -c gitea -n '__fish_seen_subcommand_from create' -f -l fullname -r -d 'The full, human-readable name of the user' +complete -c gitea -n '__fish_seen_subcommand_from create' -f -l help -s h -d 'show help' +complete -c gitea -n '__fish_seen_subcommand_from create' -f -l name -r -d 'Username. DEPRECATED: use username instead' +complete -c gitea -n '__fish_seen_subcommand_from create' -f -l username -r -d 'Username' +complete -x -c gitea -n '__fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from user; and not __fish_seen_subcommand_from create list change-password delete generate-access-token must-change-password help h' -a 'list' -d 'List users' +complete -c gitea -n '__fish_seen_subcommand_from list' -f -l admin -d 'List only admin users' +complete -c gitea -n '__fish_seen_subcommand_from list' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from user; and not __fish_seen_subcommand_from create list change-password delete generate-access-token must-change-password help h' -a 'change-password' -d 'Change a user\'s password' +complete -c gitea -n '__fish_seen_subcommand_from change-password' -f -l username -s u -r -d 'The user to change password for' +complete -c gitea -n '__fish_seen_subcommand_from change-password' -f -l password -s p -r -d 'New password to set for user' +complete -c gitea -n '__fish_seen_subcommand_from change-password' -f -l must-change-password -d 'User must change password (can be disabled by --must-change-password=false)' +complete -c gitea -n '__fish_seen_subcommand_from change-password' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from change-password; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from user; and not __fish_seen_subcommand_from create list change-password delete generate-access-token must-change-password help h' -a 'delete' -d 'Delete specific user by id, name or email' +complete -c gitea -n '__fish_seen_subcommand_from delete' -f -l id -r -d 'ID of user of the user to delete' +complete -c gitea -n '__fish_seen_subcommand_from delete' -f -l username -s u -r -d 'Username of the user to delete' +complete -c gitea -n '__fish_seen_subcommand_from delete' -f -l email -s e -r -d 'Email of the user to delete' +complete -c gitea -n '__fish_seen_subcommand_from delete' -f -l purge -d 'Purge user, all their repositories, organizations and comments' +complete -c gitea -n '__fish_seen_subcommand_from delete' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from delete; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from user; and not __fish_seen_subcommand_from create list change-password delete generate-access-token must-change-password help h' -a 'generate-access-token' -d 'Generate an access token for a specific user' +complete -c gitea -n '__fish_seen_subcommand_from generate-access-token' -f -l username -s u -r -d 'Username' +complete -c gitea -n '__fish_seen_subcommand_from generate-access-token' -f -l token-name -s t -r -d 'Token name' +complete -c gitea -n '__fish_seen_subcommand_from generate-access-token' -f -l raw -d 'Display only the token value' +complete -c gitea -n '__fish_seen_subcommand_from generate-access-token' -f -l scopes -r -d 'Comma separated list of scopes to apply to access token, examples: "all", "public-only,read:issue", "write:repository,write:user"' +complete -c gitea -n '__fish_seen_subcommand_from generate-access-token' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from generate-access-token; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from user; and not __fish_seen_subcommand_from create list change-password delete generate-access-token must-change-password help h' -a 'must-change-password' -d 'Set the must change password flag for the provided users or all users' +complete -c gitea -n '__fish_seen_subcommand_from must-change-password' -f -l all -s A -d 'All users must change password, except those explicitly excluded with --exclude' +complete -c gitea -n '__fish_seen_subcommand_from must-change-password' -f -l exclude -s e -r -d 'Do not change the must-change-password flag for these users' +complete -c gitea -n '__fish_seen_subcommand_from must-change-password' -f -l unset -d 'Instead of setting the must-change-password flag, unset it' +complete -c gitea -n '__fish_seen_subcommand_from must-change-password' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from must-change-password; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from user; and not __fish_seen_subcommand_from create list change-password delete generate-access-token must-change-password help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from admin; and not __fish_seen_subcommand_from user repo-sync-releases regenerate auth sendmail help h' -a 'repo-sync-releases' -d 'Synchronize repository releases with tags' +complete -c gitea -n '__fish_seen_subcommand_from repo-sync-releases' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from repo-sync-releases; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from admin; and not __fish_seen_subcommand_from user repo-sync-releases regenerate auth sendmail help h' -a 'regenerate' -d 'Regenerate specific files' +complete -c gitea -n '__fish_seen_subcommand_from regenerate' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from regenerate; and not __fish_seen_subcommand_from hooks keys help h' -a 'hooks' -d 'Regenerate git-hooks' +complete -c gitea -n '__fish_seen_subcommand_from hooks' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from hooks; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from regenerate; and not __fish_seen_subcommand_from hooks keys help h' -a 'keys' -d 'Regenerate authorized_keys file' +complete -c gitea -n '__fish_seen_subcommand_from keys' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from keys; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from regenerate; and not __fish_seen_subcommand_from hooks keys help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from admin; and not __fish_seen_subcommand_from user repo-sync-releases regenerate auth sendmail help h' -a 'auth' -d 'Modify external auth providers' +complete -c gitea -n '__fish_seen_subcommand_from auth' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from add-oauth update-oauth add-ldap update-ldap add-ldap-simple update-ldap-simple add-smtp update-smtp list delete help h' -a 'add-oauth' -d 'Add new Oauth authentication source' +complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l name -r -d 'Application Name' +complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l provider -r -d 'OAuth2 Provider' +complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l key -r -d 'Client ID (Key)' +complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l secret -r -d 'Client Secret' +complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l auto-discover-url -r -d 'OpenID Connect Auto Discovery URL (only required when using OpenID Connect as provider)' +complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l use-custom-urls -r -d 'Use custom URLs for GitLab/GitHub OAuth endpoints' +complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l custom-tenant-id -r -d 'Use custom Tenant ID for OAuth endpoints' +complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l custom-auth-url -r -d 'Use a custom Authorization URL (option for GitLab/GitHub)' +complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l custom-token-url -r -d 'Use a custom Token URL (option for GitLab/GitHub)' +complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l custom-profile-url -r -d 'Use a custom Profile URL (option for GitLab/GitHub)' +complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l custom-email-url -r -d 'Use a custom Email URL (option for GitHub)' +complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l icon-url -r -d 'Custom icon URL for OAuth2 login source' +complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l skip-local-2fa -d 'Set to true to skip local 2fa for users authenticated by this source' +complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l scopes -r -d 'Scopes to request when to authenticate against this OAuth2 source' +complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l required-claim-name -r -d 'Claim name that has to be set to allow users to login with this source' +complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l required-claim-value -r -d 'Claim value that has to be set to allow users to login with this source' +complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l group-claim-name -r -d 'Claim name providing group names for this source' +complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l admin-group -r -d 'Group Claim value for administrator users' +complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l restricted-group -r -d 'Group Claim value for restricted users' +complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l group-team-map -r -d 'JSON mapping between groups and org teams' +complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l group-team-map-removal -d 'Activate automatic team membership removal depending on groups' +complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from add-oauth; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from add-oauth update-oauth add-ldap update-ldap add-ldap-simple update-ldap-simple add-smtp update-smtp list delete help h' -a 'update-oauth' -d 'Update existing Oauth authentication source' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l name -r -d 'Application Name' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l id -r -d 'ID of authentication source' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l provider -r -d 'OAuth2 Provider' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l key -r -d 'Client ID (Key)' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l secret -r -d 'Client Secret' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l auto-discover-url -r -d 'OpenID Connect Auto Discovery URL (only required when using OpenID Connect as provider)' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l use-custom-urls -r -d 'Use custom URLs for GitLab/GitHub OAuth endpoints' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l custom-tenant-id -r -d 'Use custom Tenant ID for OAuth endpoints' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l custom-auth-url -r -d 'Use a custom Authorization URL (option for GitLab/GitHub)' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l custom-token-url -r -d 'Use a custom Token URL (option for GitLab/GitHub)' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l custom-profile-url -r -d 'Use a custom Profile URL (option for GitLab/GitHub)' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l custom-email-url -r -d 'Use a custom Email URL (option for GitHub)' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l icon-url -r -d 'Custom icon URL for OAuth2 login source' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l skip-local-2fa -d 'Set to true to skip local 2fa for users authenticated by this source' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l scopes -r -d 'Scopes to request when to authenticate against this OAuth2 source' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l required-claim-name -r -d 'Claim name that has to be set to allow users to login with this source' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l required-claim-value -r -d 'Claim value that has to be set to allow users to login with this source' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l group-claim-name -r -d 'Claim name providing group names for this source' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l admin-group -r -d 'Group Claim value for administrator users' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l restricted-group -r -d 'Group Claim value for restricted users' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l group-team-map -r -d 'JSON mapping between groups and org teams' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l group-team-map-removal -d 'Activate automatic team membership removal depending on groups' +complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from update-oauth; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from add-oauth update-oauth add-ldap update-ldap add-ldap-simple update-ldap-simple add-smtp update-smtp list delete help h' -a 'add-ldap' -d 'Add new LDAP (via Bind DN) authentication source' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l name -r -d 'Authentication name.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l not-active -d 'Deactivate the authentication source.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l active -d 'Activate the authentication source.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l security-protocol -r -d 'Security protocol name.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l skip-tls-verify -d 'Disable TLS verification.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l host -r -d 'The address where the LDAP server can be reached.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l port -r -d 'The port to use when connecting to the LDAP server.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l user-search-base -r -d 'The LDAP base at which user accounts will be searched for.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l user-filter -r -d 'An LDAP filter declaring how to find the user record that is attempting to authenticate.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l admin-filter -r -d 'An LDAP filter specifying if a user should be given administrator privileges.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l restricted-filter -r -d 'An LDAP filter specifying if a user should be given restricted status.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l allow-deactivate-all -d 'Allow empty search results to deactivate all users.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l username-attribute -r -d 'The attribute of the user’s LDAP record containing the user name.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l firstname-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s first name.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l surname-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s surname.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l email-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s email address.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l public-ssh-key-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s public ssh key.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l skip-local-2fa -d 'Set to true to skip local 2fa for users authenticated by this source' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l avatar-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s avatar.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l bind-dn -r -d 'The DN to bind to the LDAP server with when searching for the user.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l bind-password -r -d 'The password for the Bind DN, if any.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l attributes-in-bind -d 'Fetch attributes in bind DN context.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l synchronize-users -d 'Enable user synchronization.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l disable-synchronize-users -d 'Disable user synchronization.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l page-size -r -d 'Search page size.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l enable-groups -d 'Enable LDAP groups' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l group-search-base-dn -r -d 'The LDAP base DN at which group accounts will be searched for' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l group-member-attribute -r -d 'Group attribute containing list of users' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l group-user-attribute -r -d 'User attribute listed in group' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l group-filter -r -d 'Verify group membership in LDAP' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l group-team-map -r -d 'Map LDAP groups to Organization teams' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l group-team-map-removal -d 'Remove users from synchronized teams if user does not belong to corresponding LDAP group' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from add-ldap; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from add-oauth update-oauth add-ldap update-ldap add-ldap-simple update-ldap-simple add-smtp update-smtp list delete help h' -a 'update-ldap' -d 'Update existing LDAP (via Bind DN) authentication source' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l id -r -d 'ID of authentication source' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l name -r -d 'Authentication name.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l not-active -d 'Deactivate the authentication source.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l active -d 'Activate the authentication source.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l security-protocol -r -d 'Security protocol name.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l skip-tls-verify -d 'Disable TLS verification.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l host -r -d 'The address where the LDAP server can be reached.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l port -r -d 'The port to use when connecting to the LDAP server.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l user-search-base -r -d 'The LDAP base at which user accounts will be searched for.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l user-filter -r -d 'An LDAP filter declaring how to find the user record that is attempting to authenticate.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l admin-filter -r -d 'An LDAP filter specifying if a user should be given administrator privileges.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l restricted-filter -r -d 'An LDAP filter specifying if a user should be given restricted status.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l allow-deactivate-all -d 'Allow empty search results to deactivate all users.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l username-attribute -r -d 'The attribute of the user’s LDAP record containing the user name.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l firstname-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s first name.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l surname-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s surname.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l email-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s email address.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l public-ssh-key-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s public ssh key.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l skip-local-2fa -d 'Set to true to skip local 2fa for users authenticated by this source' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l avatar-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s avatar.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l bind-dn -r -d 'The DN to bind to the LDAP server with when searching for the user.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l bind-password -r -d 'The password for the Bind DN, if any.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l attributes-in-bind -d 'Fetch attributes in bind DN context.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l synchronize-users -d 'Enable user synchronization.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l disable-synchronize-users -d 'Disable user synchronization.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l page-size -r -d 'Search page size.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l enable-groups -d 'Enable LDAP groups' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l group-search-base-dn -r -d 'The LDAP base DN at which group accounts will be searched for' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l group-member-attribute -r -d 'Group attribute containing list of users' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l group-user-attribute -r -d 'User attribute listed in group' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l group-filter -r -d 'Verify group membership in LDAP' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l group-team-map -r -d 'Map LDAP groups to Organization teams' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l group-team-map-removal -d 'Remove users from synchronized teams if user does not belong to corresponding LDAP group' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from update-ldap; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from add-oauth update-oauth add-ldap update-ldap add-ldap-simple update-ldap-simple add-smtp update-smtp list delete help h' -a 'add-ldap-simple' -d 'Add new LDAP (simple auth) authentication source' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l name -r -d 'Authentication name.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l not-active -d 'Deactivate the authentication source.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l active -d 'Activate the authentication source.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l security-protocol -r -d 'Security protocol name.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l skip-tls-verify -d 'Disable TLS verification.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l host -r -d 'The address where the LDAP server can be reached.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l port -r -d 'The port to use when connecting to the LDAP server.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l user-search-base -r -d 'The LDAP base at which user accounts will be searched for.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l user-filter -r -d 'An LDAP filter declaring how to find the user record that is attempting to authenticate.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l admin-filter -r -d 'An LDAP filter specifying if a user should be given administrator privileges.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l restricted-filter -r -d 'An LDAP filter specifying if a user should be given restricted status.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l allow-deactivate-all -d 'Allow empty search results to deactivate all users.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l username-attribute -r -d 'The attribute of the user’s LDAP record containing the user name.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l firstname-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s first name.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l surname-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s surname.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l email-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s email address.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l public-ssh-key-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s public ssh key.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l skip-local-2fa -d 'Set to true to skip local 2fa for users authenticated by this source' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l avatar-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s avatar.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l user-dn -r -d 'The user\'s DN.' +complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from add-ldap-simple; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from add-oauth update-oauth add-ldap update-ldap add-ldap-simple update-ldap-simple add-smtp update-smtp list delete help h' -a 'update-ldap-simple' -d 'Update existing LDAP (simple auth) authentication source' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l id -r -d 'ID of authentication source' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l name -r -d 'Authentication name.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l not-active -d 'Deactivate the authentication source.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l active -d 'Activate the authentication source.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l security-protocol -r -d 'Security protocol name.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l skip-tls-verify -d 'Disable TLS verification.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l host -r -d 'The address where the LDAP server can be reached.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l port -r -d 'The port to use when connecting to the LDAP server.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l user-search-base -r -d 'The LDAP base at which user accounts will be searched for.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l user-filter -r -d 'An LDAP filter declaring how to find the user record that is attempting to authenticate.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l admin-filter -r -d 'An LDAP filter specifying if a user should be given administrator privileges.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l restricted-filter -r -d 'An LDAP filter specifying if a user should be given restricted status.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l allow-deactivate-all -d 'Allow empty search results to deactivate all users.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l username-attribute -r -d 'The attribute of the user’s LDAP record containing the user name.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l firstname-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s first name.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l surname-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s surname.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l email-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s email address.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l public-ssh-key-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s public ssh key.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l skip-local-2fa -d 'Set to true to skip local 2fa for users authenticated by this source' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l avatar-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s avatar.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l user-dn -r -d 'The user\'s DN.' +complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from update-ldap-simple; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from add-oauth update-oauth add-ldap update-ldap add-ldap-simple update-ldap-simple add-smtp update-smtp list delete help h' -a 'add-smtp' -d 'Add new SMTP authentication source' +complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l name -r -d 'Application Name' +complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l auth-type -r -d 'SMTP Authentication Type (PLAIN/LOGIN/CRAM-MD5) default PLAIN' +complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l host -r -d 'SMTP Host' +complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l port -r -d 'SMTP Port' +complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l force-smtps -d 'SMTPS is always used on port 465. Set this to force SMTPS on other ports.' +complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l skip-verify -d 'Skip TLS verify.' +complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l helo-hostname -r -d 'Hostname sent with HELO. Leave blank to send current hostname' +complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l disable-helo -d 'Disable SMTP helo.' +complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l allowed-domains -r -d 'Leave empty to allow all domains. Separate multiple domains with a comma (\',\')' +complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l skip-local-2fa -d 'Skip 2FA to log on.' +complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l active -d 'This Authentication Source is Activated.' +complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from add-smtp; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from add-oauth update-oauth add-ldap update-ldap add-ldap-simple update-ldap-simple add-smtp update-smtp list delete help h' -a 'update-smtp' -d 'Update existing SMTP authentication source' +complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l name -r -d 'Application Name' +complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l id -r -d 'ID of authentication source' +complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l auth-type -r -d 'SMTP Authentication Type (PLAIN/LOGIN/CRAM-MD5) default PLAIN' +complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l host -r -d 'SMTP Host' +complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l port -r -d 'SMTP Port' +complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l force-smtps -d 'SMTPS is always used on port 465. Set this to force SMTPS on other ports.' +complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l skip-verify -d 'Skip TLS verify.' +complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l helo-hostname -r -d 'Hostname sent with HELO. Leave blank to send current hostname' +complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l disable-helo -d 'Disable SMTP helo.' +complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l allowed-domains -r -d 'Leave empty to allow all domains. Separate multiple domains with a comma (\',\')' +complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l skip-local-2fa -d 'Skip 2FA to log on.' +complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l active -d 'This Authentication Source is Activated.' +complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from update-smtp; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from add-oauth update-oauth add-ldap update-ldap add-ldap-simple update-ldap-simple add-smtp update-smtp list delete help h' -a 'list' -d 'List auth sources' +complete -c gitea -n '__fish_seen_subcommand_from list' -f -l min-width -r -d 'Minimal cell width including any padding for the formatted table' +complete -c gitea -n '__fish_seen_subcommand_from list' -f -l tab-width -r -d 'width of tab characters in formatted table (equivalent number of spaces)' +complete -c gitea -n '__fish_seen_subcommand_from list' -f -l padding -r -d 'padding added to a cell before computing its width' +complete -c gitea -n '__fish_seen_subcommand_from list' -f -l pad-char -r -d 'ASCII char used for padding if padchar == \'\\t\', the Writer will assume that the width of a \'\\t\' in the formatted output is tabwidth, and cells are left-aligned independent of align_left (for correct-looking results, tabwidth must correspond to the tab width in the viewer displaying the result)' +complete -c gitea -n '__fish_seen_subcommand_from list' -f -l vertical-bars -d 'Set to true to print vertical bars between columns' +complete -c gitea -n '__fish_seen_subcommand_from list' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from add-oauth update-oauth add-ldap update-ldap add-ldap-simple update-ldap-simple add-smtp update-smtp list delete help h' -a 'delete' -d 'Delete specific auth source' +complete -c gitea -n '__fish_seen_subcommand_from delete' -f -l id -r -d 'ID of authentication source' +complete -c gitea -n '__fish_seen_subcommand_from delete' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from delete; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from add-oauth update-oauth add-ldap update-ldap add-ldap-simple update-ldap-simple add-smtp update-smtp list delete help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from admin; and not __fish_seen_subcommand_from user repo-sync-releases regenerate auth sendmail help h' -a 'sendmail' -d 'Send a message to all users' +complete -c gitea -n '__fish_seen_subcommand_from sendmail' -f -l title -r -d 'a title of a message' +complete -c gitea -n '__fish_seen_subcommand_from sendmail' -f -l content -r -d 'a content of a message' +complete -c gitea -n '__fish_seen_subcommand_from sendmail' -f -l force -s f -d 'A flag to bypass a confirmation step' +complete -c gitea -n '__fish_seen_subcommand_from sendmail' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from sendmail; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from admin; and not __fish_seen_subcommand_from user repo-sync-releases regenerate auth sendmail help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'migrate' -d 'Migrate the database' +complete -c gitea -n '__fish_seen_subcommand_from migrate' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from migrate; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'doctor' -d 'Diagnose and optionally fix problems, convert or re-create database tables' +complete -c gitea -n '__fish_seen_subcommand_from doctor' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from doctor; and not __fish_seen_subcommand_from check recreate-table convert help h' -a 'check' -d 'Diagnose and optionally fix problems' +complete -c gitea -n '__fish_seen_subcommand_from check' -f -l list -d 'List the available checks' +complete -c gitea -n '__fish_seen_subcommand_from check' -f -l default -d 'Run the default checks (if neither --run or --all is set, this is the default behaviour)' +complete -c gitea -n '__fish_seen_subcommand_from check' -f -l run -r -d 'Run the provided checks - (if --default is set, the default checks will also run)' +complete -c gitea -n '__fish_seen_subcommand_from check' -f -l all -d 'Run all the available checks' +complete -c gitea -n '__fish_seen_subcommand_from check' -f -l fix -d 'Automatically fix what we can' +complete -c gitea -n '__fish_seen_subcommand_from check' -f -l log-file -r -d 'Name of the log file (no verbose log output by default). Set to "-" to output to stdout' +complete -c gitea -n '__fish_seen_subcommand_from check' -f -l color -s H -d 'Use color for outputted information' +complete -c gitea -n '__fish_seen_subcommand_from check' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from check; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from doctor; and not __fish_seen_subcommand_from check recreate-table convert help h' -a 'recreate-table' -d 'Recreate tables from XORM definitions and copy the data.' +complete -c gitea -n '__fish_seen_subcommand_from recreate-table' -f -l debug -d 'Print SQL commands sent' +complete -c gitea -n '__fish_seen_subcommand_from recreate-table' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from recreate-table; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from doctor; and not __fish_seen_subcommand_from check recreate-table convert help h' -a 'convert' -d 'Convert the database' +complete -c gitea -n '__fish_seen_subcommand_from convert' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from convert; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from doctor; and not __fish_seen_subcommand_from check recreate-table convert help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'manager' -d 'Manage the running gitea process' +complete -c gitea -n '__fish_seen_subcommand_from manager' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from manager; and not __fish_seen_subcommand_from shutdown restart reload-templates flush-queues logging processes help h' -a 'shutdown' -d 'Gracefully shutdown the running process' +complete -c gitea -n '__fish_seen_subcommand_from shutdown' -f -l debug +complete -c gitea -n '__fish_seen_subcommand_from shutdown' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from shutdown; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from manager; and not __fish_seen_subcommand_from shutdown restart reload-templates flush-queues logging processes help h' -a 'restart' -d 'Gracefully restart the running process - (not implemented for windows servers)' +complete -c gitea -n '__fish_seen_subcommand_from restart' -f -l debug +complete -c gitea -n '__fish_seen_subcommand_from restart' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from restart; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from manager; and not __fish_seen_subcommand_from shutdown restart reload-templates flush-queues logging processes help h' -a 'reload-templates' -d 'Reload template files in the running process' +complete -c gitea -n '__fish_seen_subcommand_from reload-templates' -f -l debug +complete -c gitea -n '__fish_seen_subcommand_from reload-templates' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from reload-templates; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from manager; and not __fish_seen_subcommand_from shutdown restart reload-templates flush-queues logging processes help h' -a 'flush-queues' -d 'Flush queues in the running process' +complete -c gitea -n '__fish_seen_subcommand_from flush-queues' -f -l timeout -r -d 'Timeout for the flushing process' +complete -c gitea -n '__fish_seen_subcommand_from flush-queues' -f -l non-blocking -d 'Set to true to not wait for flush to complete before returning' +complete -c gitea -n '__fish_seen_subcommand_from flush-queues' -f -l debug +complete -c gitea -n '__fish_seen_subcommand_from flush-queues' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from flush-queues; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from manager; and not __fish_seen_subcommand_from shutdown restart reload-templates flush-queues logging processes help h' -a 'logging' -d 'Adjust logging commands' +complete -c gitea -n '__fish_seen_subcommand_from logging' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from logging; and not __fish_seen_subcommand_from pause resume release-and-reopen remove add log-sql help h' -a 'pause' -d 'Pause logging (Gitea will buffer logs up to a certain point and will drop them after that point)' +complete -c gitea -n '__fish_seen_subcommand_from pause' -f -l debug +complete -c gitea -n '__fish_seen_subcommand_from pause' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from pause; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from logging; and not __fish_seen_subcommand_from pause resume release-and-reopen remove add log-sql help h' -a 'resume' -d 'Resume logging' +complete -c gitea -n '__fish_seen_subcommand_from resume' -f -l debug +complete -c gitea -n '__fish_seen_subcommand_from resume' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from resume; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from logging; and not __fish_seen_subcommand_from pause resume release-and-reopen remove add log-sql help h' -a 'release-and-reopen' -d 'Cause Gitea to release and re-open files used for logging' +complete -c gitea -n '__fish_seen_subcommand_from release-and-reopen' -f -l debug +complete -c gitea -n '__fish_seen_subcommand_from release-and-reopen' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from release-and-reopen; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from logging; and not __fish_seen_subcommand_from pause resume release-and-reopen remove add log-sql help h' -a 'remove' -d 'Remove a logger' +complete -c gitea -n '__fish_seen_subcommand_from remove' -f -l debug +complete -c gitea -n '__fish_seen_subcommand_from remove' -f -l logger -r -d 'Logger name - will default to "default"' +complete -c gitea -n '__fish_seen_subcommand_from remove' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from remove; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from logging; and not __fish_seen_subcommand_from pause resume release-and-reopen remove add log-sql help h' -a 'add' -d 'Add a logger' +complete -c gitea -n '__fish_seen_subcommand_from add' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from add; and not __fish_seen_subcommand_from file conn help h' -a 'file' -d 'Add a file logger' +complete -c gitea -n '__fish_seen_subcommand_from file' -f -l logger -r -d 'Logger name - will default to "default"' +complete -c gitea -n '__fish_seen_subcommand_from file' -f -l writer -r -d 'Name of the log writer - will default to mode' +complete -c gitea -n '__fish_seen_subcommand_from file' -f -l level -r -d 'Logging level for the new logger' +complete -c gitea -n '__fish_seen_subcommand_from file' -f -l stacktrace-level -s L -r -d 'Stacktrace logging level' +complete -c gitea -n '__fish_seen_subcommand_from file' -f -l flags -s F -r -d 'Flags for the logger' +complete -c gitea -n '__fish_seen_subcommand_from file' -f -l expression -s e -r -d 'Matching expression for the logger' +complete -c gitea -n '__fish_seen_subcommand_from file' -f -l prefix -s p -r -d 'Prefix for the logger' +complete -c gitea -n '__fish_seen_subcommand_from file' -f -l color -d 'Use color in the logs' +complete -c gitea -n '__fish_seen_subcommand_from file' -f -l debug +complete -c gitea -n '__fish_seen_subcommand_from file' -f -l filename -s f -r -d 'Filename for the logger - this must be set.' +complete -c gitea -n '__fish_seen_subcommand_from file' -f -l rotate -s r -d 'Rotate logs' +complete -c gitea -n '__fish_seen_subcommand_from file' -f -l max-size -s s -r -d 'Maximum size in bytes before rotation' +complete -c gitea -n '__fish_seen_subcommand_from file' -f -l daily -s d -d 'Rotate logs daily' +complete -c gitea -n '__fish_seen_subcommand_from file' -f -l max-days -s D -r -d 'Maximum number of daily logs to keep' +complete -c gitea -n '__fish_seen_subcommand_from file' -f -l compress -s z -d 'Compress rotated logs' +complete -c gitea -n '__fish_seen_subcommand_from file' -f -l compression-level -s Z -r -d 'Compression level to use' +complete -c gitea -n '__fish_seen_subcommand_from file' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from file; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from add; and not __fish_seen_subcommand_from file conn help h' -a 'conn' -d 'Add a net conn logger' +complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l logger -r -d 'Logger name - will default to "default"' +complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l writer -r -d 'Name of the log writer - will default to mode' +complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l level -r -d 'Logging level for the new logger' +complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l stacktrace-level -s L -r -d 'Stacktrace logging level' +complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l flags -s F -r -d 'Flags for the logger' +complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l expression -s e -r -d 'Matching expression for the logger' +complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l prefix -s p -r -d 'Prefix for the logger' +complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l color -d 'Use color in the logs' +complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l debug +complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l reconnect-on-message -s R -d 'Reconnect to host for every message' +complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l reconnect -s r -d 'Reconnect to host when connection is dropped' +complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l protocol -s P -r -d 'Set protocol to use: tcp, unix, or udp (defaults to tcp)' +complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l address -s a -r -d 'Host address and port to connect to (defaults to :7020)' +complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from conn; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from add; and not __fish_seen_subcommand_from file conn help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from logging; and not __fish_seen_subcommand_from pause resume release-and-reopen remove add log-sql help h' -a 'log-sql' -d 'Set LogSQL' +complete -c gitea -n '__fish_seen_subcommand_from log-sql' -f -l debug +complete -c gitea -n '__fish_seen_subcommand_from log-sql' -f -l off -d 'Switch off SQL logging' +complete -c gitea -n '__fish_seen_subcommand_from log-sql' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from log-sql; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from logging; and not __fish_seen_subcommand_from pause resume release-and-reopen remove add log-sql help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from manager; and not __fish_seen_subcommand_from shutdown restart reload-templates flush-queues logging processes help h' -a 'processes' -d 'Display running processes within the current process' +complete -c gitea -n '__fish_seen_subcommand_from processes' -f -l debug +complete -c gitea -n '__fish_seen_subcommand_from processes' -f -l flat -d 'Show processes as flat table rather than as tree' +complete -c gitea -n '__fish_seen_subcommand_from processes' -f -l no-system -d 'Do not show system processes' +complete -c gitea -n '__fish_seen_subcommand_from processes' -f -l stacktraces -d 'Show stacktraces' +complete -c gitea -n '__fish_seen_subcommand_from processes' -f -l json -d 'Output as json' +complete -c gitea -n '__fish_seen_subcommand_from processes' -f -l cancel -r -d 'Process PID to cancel. (Only available for non-system processes.)' +complete -c gitea -n '__fish_seen_subcommand_from processes' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from processes; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from manager; and not __fish_seen_subcommand_from shutdown restart reload-templates flush-queues logging processes help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'embedded' -d 'Extract embedded resources' +complete -c gitea -n '__fish_seen_subcommand_from embedded' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from embedded; and not __fish_seen_subcommand_from list view extract help h' -a 'list' -d 'List files matching the given pattern' +complete -c gitea -n '__fish_seen_subcommand_from list' -f -l include-vendored -s vendor -d 'Include files under public/vendor as well' +complete -c gitea -n '__fish_seen_subcommand_from list' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from embedded; and not __fish_seen_subcommand_from list view extract help h' -a 'view' -d 'View a file matching the given pattern' +complete -c gitea -n '__fish_seen_subcommand_from view' -f -l include-vendored -s vendor -d 'Include files under public/vendor as well' +complete -c gitea -n '__fish_seen_subcommand_from view' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from view; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from embedded; and not __fish_seen_subcommand_from list view extract help h' -a 'extract' -d 'Extract resources' +complete -c gitea -n '__fish_seen_subcommand_from extract' -f -l include-vendored -s vendor -d 'Include files under public/vendor as well' +complete -c gitea -n '__fish_seen_subcommand_from extract' -f -l overwrite -d 'Overwrite files if they already exist' +complete -c gitea -n '__fish_seen_subcommand_from extract' -f -l rename -d 'Rename files as {name}.bak if they already exist (overwrites previous .bak)' +complete -c gitea -n '__fish_seen_subcommand_from extract' -f -l custom -d 'Extract to the \'custom\' directory as per app.ini' +complete -c gitea -n '__fish_seen_subcommand_from extract' -f -l destination -s dest-dir -r -d 'Extract to the specified directory' +complete -c gitea -n '__fish_seen_subcommand_from extract' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from extract; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from embedded; and not __fish_seen_subcommand_from list view extract help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'migrate-storage' -d 'Migrate the storage' +complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l type -s t -r -d 'Type of stored files to copy. Allowed types: \'attachments\', \'lfs\', \'avatars\', \'repo-avatars\', \'repo-archivers\', \'packages\', \'actions-log\', \'actions-artifacts' +complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l storage -s s -r -d 'New storage type: local (default), minio or azureblob' +complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l path -s p -r -d 'New storage placement if store is local (leave blank for default)' +complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l minio-endpoint -r -d 'Minio storage endpoint' +complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l minio-access-key-id -r -d 'Minio storage accessKeyID' +complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l minio-secret-access-key -r -d 'Minio storage secretAccessKey' +complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l minio-bucket -r -d 'Minio storage bucket' +complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l minio-location -r -d 'Minio storage location to create bucket' +complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l minio-base-path -r -d 'Minio storage base path on the bucket' +complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l minio-use-ssl -d 'Enable SSL for minio' +complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l minio-insecure-skip-verify -d 'Skip SSL verification' +complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l minio-checksum-algorithm -r -d 'Minio checksum algorithm (default/md5)' +complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l minio-bucket-lookup-type -r -d 'Minio bucket lookup type' +complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l azureblob-endpoint -r -d 'Azure Blob storage endpoint' +complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l azureblob-account-name -r -d 'Azure Blob storage account name' +complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l azureblob-account-key -r -d 'Azure Blob storage account key' +complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l azureblob-container -r -d 'Azure Blob storage container' +complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l azureblob-base-path -r -d 'Azure Blob storage base path' +complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from migrate-storage; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'dump-repo' -d 'Dump the repository from git/github/gitea/gitlab' +complete -c gitea -n '__fish_seen_subcommand_from dump-repo' -f -l git_service -r -d 'Git service, git, github, gitea, gitlab. If clone_addr could be recognized, this could be ignored.' +complete -c gitea -n '__fish_seen_subcommand_from dump-repo' -f -l repo_dir -s r -r -d 'Repository dir path to store the data' +complete -c gitea -n '__fish_seen_subcommand_from dump-repo' -f -l clone_addr -r -d 'The URL will be clone, currently could be a git/github/gitea/gitlab http/https URL' +complete -c gitea -n '__fish_seen_subcommand_from dump-repo' -f -l auth_username -r -d 'The username to visit the clone_addr' +complete -c gitea -n '__fish_seen_subcommand_from dump-repo' -f -l auth_password -r -d 'The password to visit the clone_addr' +complete -c gitea -n '__fish_seen_subcommand_from dump-repo' -f -l auth_token -r -d 'The personal token to visit the clone_addr' +complete -c gitea -n '__fish_seen_subcommand_from dump-repo' -f -l owner_name -r -d 'The data will be stored on a directory with owner name if not empty' +complete -c gitea -n '__fish_seen_subcommand_from dump-repo' -f -l repo_name -r -d 'The data will be stored on a directory with repository name if not empty' +complete -c gitea -n '__fish_seen_subcommand_from dump-repo' -f -l units -r -d 'Which items will be migrated, one or more units should be separated as comma. +wiki, issues, labels, releases, release_assets, milestones, pull_requests, comments are allowed. Empty means all units.' +complete -c gitea -n '__fish_seen_subcommand_from dump-repo' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from dump-repo; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'restore-repo' -d 'Restore the repository from disk' +complete -c gitea -n '__fish_seen_subcommand_from restore-repo' -f -l repo_dir -s r -r -d 'Repository dir path to restore from' +complete -c gitea -n '__fish_seen_subcommand_from restore-repo' -f -l owner_name -r -d 'Restore destination owner name' +complete -c gitea -n '__fish_seen_subcommand_from restore-repo' -f -l repo_name -r -d 'Restore destination repository name' +complete -c gitea -n '__fish_seen_subcommand_from restore-repo' -f -l units -r -d 'Which items will be restored, one or more units should be separated as comma. +wiki, issues, labels, releases, release_assets, milestones, pull_requests, comments are allowed. Empty means all units.' +complete -c gitea -n '__fish_seen_subcommand_from restore-repo' -f -l validation -d 'Sanity check the content of the files before trying to load them' +complete -c gitea -n '__fish_seen_subcommand_from restore-repo' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from restore-repo; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'actions' -d 'Manage Gitea Actions' +complete -c gitea -n '__fish_seen_subcommand_from actions' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from actions; and not __fish_seen_subcommand_from generate-runner-token grt help h' -a 'generate-runner-token' -d 'Generate a new token for a runner to use to register with the server' +complete -c gitea -n '__fish_seen_subcommand_from generate-runner-token grt' -f -l scope -s s -r -d '{owner}[/{repo}] - leave empty for a global runner' +complete -c gitea -n '__fish_seen_subcommand_from generate-runner-token grt' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from generate-runner-token grt; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from actions; and not __fish_seen_subcommand_from generate-runner-token grt help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'cert' -d 'Generate self-signed certificate' +complete -c gitea -n '__fish_seen_subcommand_from cert' -f -l host -r -d 'Comma-separated hostnames and IPs to generate a certificate for' +complete -c gitea -n '__fish_seen_subcommand_from cert' -f -l ecdsa-curve -r -d 'ECDSA curve to use to generate a key. Valid values are P224, P256, P384, P521' +complete -c gitea -n '__fish_seen_subcommand_from cert' -f -l rsa-bits -r -d 'Size of RSA key to generate. Ignored if --ecdsa-curve is set' +complete -c gitea -n '__fish_seen_subcommand_from cert' -f -l start-date -r -d 'Creation date formatted as Jan 1 15:04:05 2011' +complete -c gitea -n '__fish_seen_subcommand_from cert' -f -l duration -r -d 'Duration that certificate is valid for' +complete -c gitea -n '__fish_seen_subcommand_from cert' -f -l ca -d 'whether this cert should be its own Certificate Authority' +complete -c gitea -n '__fish_seen_subcommand_from cert' -f -l out -r -d 'Path to the file where there certificate will be saved' +complete -c gitea -n '__fish_seen_subcommand_from cert' -f -l keyout -r -d 'Path to the file where there certificate key will be saved' +complete -c gitea -n '__fish_seen_subcommand_from cert' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from cert; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'generate' -d 'Generate Gitea\'s secrets/keys/tokens' +complete -c gitea -n '__fish_seen_subcommand_from generate' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from generate; and not __fish_seen_subcommand_from secret help h' -a 'secret' -d 'Generate a secret token' +complete -c gitea -n '__fish_seen_subcommand_from secret' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from secret; and not __fish_seen_subcommand_from INTERNAL_TOKEN JWT_SECRET LFS_JWT_SECRET SECRET_KEY help h' -a 'INTERNAL_TOKEN' -d 'Generate a new INTERNAL_TOKEN' +complete -c gitea -n '__fish_seen_subcommand_from INTERNAL_TOKEN' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from INTERNAL_TOKEN; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from secret; and not __fish_seen_subcommand_from INTERNAL_TOKEN JWT_SECRET LFS_JWT_SECRET SECRET_KEY help h' -a 'JWT_SECRET' -d 'Generate a new JWT_SECRET' +complete -c gitea -n '__fish_seen_subcommand_from JWT_SECRET LFS_JWT_SECRET' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from JWT_SECRET LFS_JWT_SECRET; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from secret; and not __fish_seen_subcommand_from INTERNAL_TOKEN JWT_SECRET LFS_JWT_SECRET SECRET_KEY help h' -a 'SECRET_KEY' -d 'Generate a new SECRET_KEY' +complete -c gitea -n '__fish_seen_subcommand_from SECRET_KEY' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from SECRET_KEY; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from secret; and not __fish_seen_subcommand_from INTERNAL_TOKEN JWT_SECRET LFS_JWT_SECRET SECRET_KEY help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_seen_subcommand_from generate; and not __fish_seen_subcommand_from secret help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'docs' -d 'Output CLI documentation' +complete -c gitea -n '__fish_seen_subcommand_from docs' -f -l man -d 'Output man pages instead' +complete -c gitea -n '__fish_seen_subcommand_from docs' -f -l output -s o -r -d 'Path to output to instead of stdout (will overwrite if exists)' +complete -c gitea -n '__fish_seen_subcommand_from docs' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from docs; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c gitea -n '__fish_seen_subcommand_from completion' -f -l help -s h -d 'show help' +complete -x -c gitea -n '__fish_seen_subcommand_from completion; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' diff --git a/contrib/autocompletion/zsh_autocomplete b/contrib/autocompletion/zsh_autocomplete index b3b40df503f67..2273a137ef53f 100644 --- a/contrib/autocompletion/zsh_autocomplete +++ b/contrib/autocompletion/zsh_autocomplete @@ -1,30 +1,29 @@ -#compdef ${PROG:=gitea} +#compdef gitea +compdef _gitea gitea +# This is a shell completion script auto-generated by https://github.com/urfave/cli for zsh. -# Heavily inspired by https://github.com/urfave/cli +_gitea() { + local -a opts # Declare a local array + local current + current=${words[-1]} # -1 means "the last element" + if [[ "$current" == "-"* ]]; then + # Current word starts with a hyphen, so complete flags/options + opts=("${(@f)$(${words[@]:0:#words[@]-1} ${current} --generate-shell-completion)}") + else + # Current word does not start with a hyphen, so complete subcommands + opts=("${(@f)$(${words[@]:0:#words[@]-1} --generate-shell-completion)}") + fi -_cli_zsh_autocomplete() { - - local -a opts - local cur - cur=${words[-1]} - if [[ "$cur" == "-"* ]]; then - opts=("${(@f)$(_CLI_ZSH_AUTOCOMPLETE_HACK=1 ${words[@]:0:#words[@]-1} ${cur} --generate-bash-completion)}") - else - opts=("${(@f)$(_CLI_ZSH_AUTOCOMPLETE_HACK=1 ${words[@]:0:#words[@]-1} --generate-bash-completion)}") - fi - - if [[ "${opts[1]}" != "" ]]; then - _describe 'values' opts - else - _files - fi - - return + if [[ "${opts[1]}" != "" ]]; then + _describe 'values' opts + else + _files + fi } -if [ -z $PROG ] ; then - compdef _cli_zsh_autocomplete gitea -else - compdef _cli_zsh_autocomplete $(basename $PROG) +# Don't run the completion function when being source-ed or eval-ed. +# See https://github.com/urfave/cli/issues/1874 for discussion. +if [ "$funcstack[1]" = "_gitea" ]; then + _gitea fi From 44db958bbf26b114426b031146b95a291422d057 Mon Sep 17 00:00:00 2001 From: TheFox0x7 Date: Sun, 6 Jul 2025 12:19:48 +0200 Subject: [PATCH 07/15] add file hint for config settings --- cmd/main.go | 23 +++++++++++++---------- contrib/autocompletion/gitea.fish | 6 +++--- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index 823eac4cef358..0120ec3d500b9 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -81,20 +81,23 @@ func NewMainApp(appVer AppVersion) *cli.Command { app.EnableShellCompletion = true app.Flags = []cli.Flag{ &cli.StringFlag{ - Name: "custom-path", - Aliases: []string{"C"}, - Usage: "Set custom path (defaults to '{WorkPath}/custom')", + Name: "custom-path", + Aliases: []string{"C"}, + TakesFile: true, + Usage: "Set custom path (defaults to '{WorkPath}/custom')", }, &cli.StringFlag{ - Name: "config", - Aliases: []string{"c"}, - Value: setting.CustomConf, - Usage: "Set custom config file (defaults to '{WorkPath}/custom/conf/app.ini')", + Name: "config", + Aliases: []string{"c"}, + TakesFile: true, + Value: setting.CustomConf, + Usage: "Set custom config file (defaults to '{WorkPath}/custom/conf/app.ini')", }, &cli.StringFlag{ - Name: "work-path", - Aliases: []string{"w"}, - Usage: "Set Gitea's working path (defaults to the Gitea's binary directory)", + Name: "work-path", + Aliases: []string{"w"}, + TakesFile: true, + Usage: "Set Gitea's working path (defaults to the Gitea's binary directory)", }, } // these sub-commands need to use config file diff --git a/contrib/autocompletion/gitea.fish b/contrib/autocompletion/gitea.fish index a6cebd82de081..f3864847d4811 100644 --- a/contrib/autocompletion/gitea.fish +++ b/contrib/autocompletion/gitea.fish @@ -9,9 +9,9 @@ function __fish_gitea_no_subcommand --description 'Test if there has been any su return 0 end -complete -c gitea -n '__fish_gitea_no_subcommand' -f -l custom-path -s C -r -d 'Set custom path (defaults to \'{WorkPath}/custom\')' -complete -c gitea -n '__fish_gitea_no_subcommand' -f -l config -s c -r -d 'Set custom config file (defaults to \'{WorkPath}/custom/conf/app.ini\')' -complete -c gitea -n '__fish_gitea_no_subcommand' -f -l work-path -s w -r -d 'Set Gitea\'s working path (defaults to the Gitea\'s binary directory)' +complete -c gitea -n '__fish_gitea_no_subcommand' -l custom-path -s C -r -d 'Set custom path (defaults to \'{WorkPath}/custom\')' +complete -c gitea -n '__fish_gitea_no_subcommand' -l config -s c -r -d 'Set custom config file (defaults to \'{WorkPath}/custom/conf/app.ini\')' +complete -c gitea -n '__fish_gitea_no_subcommand' -l work-path -s w -r -d 'Set Gitea\'s working path (defaults to the Gitea\'s binary directory)' complete -c gitea -n '__fish_gitea_no_subcommand' -f -l help -s h -d 'show help' complete -c gitea -n '__fish_gitea_no_subcommand' -f -l version -s v -d 'print the version' complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'help' -d 'Shows a list of commands or help for one command' From 947f0dcad4f81cd9b1526a5d7712f4c4b951e971 Mon Sep 17 00:00:00 2001 From: TheFox0x7 Date: Sun, 6 Jul 2025 12:20:09 +0200 Subject: [PATCH 08/15] add makefile rule for completions add fish to docs --- Makefile | 7 +++++++ contrib/autocompletion/README | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6a3fa60e495ce..23829f405bf28 100644 --- a/Makefile +++ b/Makefile @@ -915,6 +915,13 @@ generate-manpage: ## generate manpage @gzip -9 man/man1/gitea.1 && echo man/man1/gitea.1.gz created @#TODO A small script that formats config-cheat-sheet.en-us.md nicely for use as a config man page +.PHONY: generate-completions +generate-completions: ## generate shell completions + @[ -f gitea ] || make backend + @./gitea completion bash > contrib/autocompletion/bash_autocomplete + @./gitea completion zsh > contrib/autocompletion/zsh_autocomplete + @./gitea completion fish > contrib/autocompletion/gitea.fish + .PHONY: docker docker: docker build --disable-content-trust=false -t $(DOCKER_REF) . diff --git a/contrib/autocompletion/README b/contrib/autocompletion/README index 1defd219d8aa1..d589c150d608a 100644 --- a/contrib/autocompletion/README +++ b/contrib/autocompletion/README @@ -7,11 +7,17 @@ From within the gitea root run: source contrib/autocompletion/bash_autocomplete ``` -or for zsh run: +for zsh run: -```bash +```zsh source contrib/autocompletion/zsh_autocomplete ``` +and for fish: + +```fish +source contrib/autocompletion/gitea.fish +``` + These scripts will check if gitea is on the path and if so add autocompletion for `gitea`. Or if not autocompletion will work for `./gitea`. If gitea has been installed as a different program pass in the `PROG` environment variable to set the correct program name. From 197894cfa6eb1176534dad690c9d6d9508718f36 Mon Sep 17 00:00:00 2001 From: TheFox0x7 Date: Sun, 6 Jul 2025 13:06:45 +0200 Subject: [PATCH 09/15] revert markdown codeblock change --- contrib/autocompletion/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/autocompletion/README b/contrib/autocompletion/README index d589c150d608a..11e5ce57175ca 100644 --- a/contrib/autocompletion/README +++ b/contrib/autocompletion/README @@ -9,7 +9,7 @@ source contrib/autocompletion/bash_autocomplete for zsh run: -```zsh +```bash source contrib/autocompletion/zsh_autocomplete ``` From 2d62ccc2a73d30a83d36f395d3ebc268d8bf8beb Mon Sep 17 00:00:00 2001 From: TheFox0x7 Date: Sun, 6 Jul 2025 13:13:55 +0200 Subject: [PATCH 10/15] render readme as markdown --- contrib/autocompletion/{README => README.md} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename contrib/autocompletion/{README => README.md} (96%) diff --git a/contrib/autocompletion/README b/contrib/autocompletion/README.md similarity index 96% rename from contrib/autocompletion/README rename to contrib/autocompletion/README.md index 11e5ce57175ca..3716bbbd45ccd 100644 --- a/contrib/autocompletion/README +++ b/contrib/autocompletion/README.md @@ -9,11 +9,11 @@ source contrib/autocompletion/bash_autocomplete for zsh run: -```bash +```zsh source contrib/autocompletion/zsh_autocomplete ``` -and for fish: +or for fish: ```fish source contrib/autocompletion/gitea.fish From d66fa8ce537c4ef819493ef897372c14697a08cd Mon Sep 17 00:00:00 2001 From: TheFox0x7 Date: Sun, 6 Jul 2025 16:07:04 +0200 Subject: [PATCH 11/15] drop completions now that they can be generated --- Makefile | 7 - contrib/autocompletion/README.md | 23 - contrib/autocompletion/bash_autocomplete | 34 -- contrib/autocompletion/gitea.fish | 572 ----------------------- contrib/autocompletion/zsh_autocomplete | 29 -- 5 files changed, 665 deletions(-) delete mode 100644 contrib/autocompletion/README.md delete mode 100755 contrib/autocompletion/bash_autocomplete delete mode 100644 contrib/autocompletion/gitea.fish delete mode 100644 contrib/autocompletion/zsh_autocomplete diff --git a/Makefile b/Makefile index 23829f405bf28..6a3fa60e495ce 100644 --- a/Makefile +++ b/Makefile @@ -915,13 +915,6 @@ generate-manpage: ## generate manpage @gzip -9 man/man1/gitea.1 && echo man/man1/gitea.1.gz created @#TODO A small script that formats config-cheat-sheet.en-us.md nicely for use as a config man page -.PHONY: generate-completions -generate-completions: ## generate shell completions - @[ -f gitea ] || make backend - @./gitea completion bash > contrib/autocompletion/bash_autocomplete - @./gitea completion zsh > contrib/autocompletion/zsh_autocomplete - @./gitea completion fish > contrib/autocompletion/gitea.fish - .PHONY: docker docker: docker build --disable-content-trust=false -t $(DOCKER_REF) . diff --git a/contrib/autocompletion/README.md b/contrib/autocompletion/README.md deleted file mode 100644 index 3716bbbd45ccd..0000000000000 --- a/contrib/autocompletion/README.md +++ /dev/null @@ -1,23 +0,0 @@ -Bash and Zsh completion -======================= - -From within the gitea root run: - -```bash -source contrib/autocompletion/bash_autocomplete -``` - -for zsh run: - -```zsh -source contrib/autocompletion/zsh_autocomplete -``` - -or for fish: - -```fish -source contrib/autocompletion/gitea.fish -``` - -These scripts will check if gitea is on the path and if so add autocompletion for `gitea`. Or if not autocompletion will work for `./gitea`. -If gitea has been installed as a different program pass in the `PROG` environment variable to set the correct program name. diff --git a/contrib/autocompletion/bash_autocomplete b/contrib/autocompletion/bash_autocomplete deleted file mode 100755 index dfc08b0c3e2e7..0000000000000 --- a/contrib/autocompletion/bash_autocomplete +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# This is a shell completion script auto-generated by https://github.com/urfave/cli for bash. - -# Macs have bash3 for which the bash-completion package doesn't include -# _init_completion. This is a minimal version of that function. -__gitea_init_completion() { - COMPREPLY=() - _get_comp_words_by_ref "$@" cur prev words cword -} - -__gitea_bash_autocomplete() { - if [[ "${COMP_WORDS[0]}" != "source" ]]; then - local cur opts base words - COMPREPLY=() - cur="${COMP_WORDS[COMP_CWORD]}" - if declare -F _init_completion >/dev/null 2>&1; then - _init_completion -n "=:" || return - else - __gitea_init_completion -n "=:" || return - fi - words=("${words[@]:0:$cword}") - if [[ "$cur" == "-"* ]]; then - requestComp="${words[*]} ${cur} --generate-shell-completion" - else - requestComp="${words[*]} --generate-shell-completion" - fi - opts=$(eval "${requestComp}" 2>/dev/null) - COMPREPLY=($(compgen -W "${opts}" -- ${cur})) - return 0 - fi -} - -complete -o bashdefault -o default -o nospace -F __gitea_bash_autocomplete gitea diff --git a/contrib/autocompletion/gitea.fish b/contrib/autocompletion/gitea.fish deleted file mode 100644 index f3864847d4811..0000000000000 --- a/contrib/autocompletion/gitea.fish +++ /dev/null @@ -1,572 +0,0 @@ -# gitea fish shell completion - -function __fish_gitea_no_subcommand --description 'Test if there has been any subcommand yet' - for i in (commandline -opc) - if contains -- $i help h web serv hook keys dump admin migrate doctor manager embedded migrate-storage dump-repo restore-repo actions cert generate docs completion - return 1 - end - end - return 0 -end - -complete -c gitea -n '__fish_gitea_no_subcommand' -l custom-path -s C -r -d 'Set custom path (defaults to \'{WorkPath}/custom\')' -complete -c gitea -n '__fish_gitea_no_subcommand' -l config -s c -r -d 'Set custom config file (defaults to \'{WorkPath}/custom/conf/app.ini\')' -complete -c gitea -n '__fish_gitea_no_subcommand' -l work-path -s w -r -d 'Set Gitea\'s working path (defaults to the Gitea\'s binary directory)' -complete -c gitea -n '__fish_gitea_no_subcommand' -f -l help -s h -d 'show help' -complete -c gitea -n '__fish_gitea_no_subcommand' -f -l version -s v -d 'print the version' -complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'help' -d 'Shows a list of commands or help for one command' -complete -c gitea -n '__fish_seen_subcommand_from help h' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from help h; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'web' -d 'Start Gitea web server' -complete -c gitea -n '__fish_seen_subcommand_from web' -f -l port -s p -r -d 'Temporary port number to prevent conflict' -complete -c gitea -n '__fish_seen_subcommand_from web' -f -l install-port -r -d 'Temporary port number to run the install page on to prevent conflict' -complete -c gitea -n '__fish_seen_subcommand_from web' -f -l pid -s P -r -d 'Custom pid file path' -complete -c gitea -n '__fish_seen_subcommand_from web' -f -l quiet -s q -d 'Only display Fatal logging errors until logging is set-up' -complete -c gitea -n '__fish_seen_subcommand_from web' -f -l verbose -d 'Set initial logging to TRACE level until logging is properly set-up' -complete -c gitea -n '__fish_seen_subcommand_from web' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from web; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -c gitea -n '__fish_seen_subcommand_from serv' -f -l enable-pprof -complete -c gitea -n '__fish_seen_subcommand_from serv' -f -l debug -complete -c gitea -n '__fish_seen_subcommand_from serv' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from serv; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -c gitea -n '__fish_seen_subcommand_from hook' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from hook; and not __fish_seen_subcommand_from pre-receive update post-receive proc-receive help h' -a 'pre-receive' -d 'Delegate pre-receive Git hook' -complete -c gitea -n '__fish_seen_subcommand_from pre-receive' -f -l debug -complete -c gitea -n '__fish_seen_subcommand_from pre-receive' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from pre-receive; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from hook; and not __fish_seen_subcommand_from pre-receive update post-receive proc-receive help h' -a 'update' -d 'Delegate update Git hook' -complete -c gitea -n '__fish_seen_subcommand_from update' -f -l debug -complete -c gitea -n '__fish_seen_subcommand_from update' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from update; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from hook; and not __fish_seen_subcommand_from pre-receive update post-receive proc-receive help h' -a 'post-receive' -d 'Delegate post-receive Git hook' -complete -c gitea -n '__fish_seen_subcommand_from post-receive' -f -l debug -complete -c gitea -n '__fish_seen_subcommand_from post-receive' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from post-receive; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from hook; and not __fish_seen_subcommand_from pre-receive update post-receive proc-receive help h' -a 'proc-receive' -d 'Delegate proc-receive Git hook' -complete -c gitea -n '__fish_seen_subcommand_from proc-receive' -f -l debug -complete -c gitea -n '__fish_seen_subcommand_from proc-receive' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from proc-receive; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from hook; and not __fish_seen_subcommand_from pre-receive update post-receive proc-receive help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -c gitea -n '__fish_seen_subcommand_from keys' -f -l expected -s e -r -d 'Expected user for whom provide key commands' -complete -c gitea -n '__fish_seen_subcommand_from keys' -f -l username -s u -r -d 'Username trying to log in by SSH' -complete -c gitea -n '__fish_seen_subcommand_from keys' -f -l type -s t -r -d 'Type of the SSH key provided to the SSH Server (requires content to be provided too)' -complete -c gitea -n '__fish_seen_subcommand_from keys' -f -l content -s k -r -d 'Base64 encoded content of the SSH key provided to the SSH Server (requires type to be provided too)' -complete -c gitea -n '__fish_seen_subcommand_from keys' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from keys; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'dump' -d 'Dump Gitea files and database' -complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l file -s f -r -d 'Name of the dump file which will be created, default to "gitea-dump-{time}.zip". Supply \'-\' for stdout. See type for available types.' -complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l verbose -s V -d 'Show process details' -complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l quiet -s q -d 'Only display warnings and errors' -complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l tempdir -s t -r -d 'Temporary dir path' -complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l database -s d -r -d 'Specify the database SQL syntax: sqlite3, mysql, mssql, postgres' -complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l skip-repository -s R -d 'Skip the repository dumping' -complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l skip-log -s L -d 'Skip the log dumping' -complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l skip-custom-dir -d 'Skip custom directory' -complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l skip-lfs-data -d 'Skip LFS data' -complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l skip-attachment-data -d 'Skip attachment data' -complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l skip-package-data -d 'Skip package data' -complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l skip-index -d 'Skip bleve index data' -complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l skip-db -d 'Skip database' -complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l type -r -d 'Dump output format, default to "zip", supported types: zip, tar, tar.sz, tar.gz, tar.xz, tar.bz2, tar.br, tar.lz4, tar.zst' -complete -c gitea -n '__fish_seen_subcommand_from dump' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from dump; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'admin' -d 'Perform common administrative operations' -complete -c gitea -n '__fish_seen_subcommand_from admin' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from admin; and not __fish_seen_subcommand_from user repo-sync-releases regenerate auth sendmail help h' -a 'user' -d 'Modify users' -complete -c gitea -n '__fish_seen_subcommand_from user' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from user; and not __fish_seen_subcommand_from create list change-password delete generate-access-token must-change-password help h' -a 'create' -d 'Create a new user in database' -complete -c gitea -n '__fish_seen_subcommand_from create' -f -l user-type -r -d 'Set user\'s type: individual or bot' -complete -c gitea -n '__fish_seen_subcommand_from create' -f -l password -r -d 'User password' -complete -c gitea -n '__fish_seen_subcommand_from create' -f -l email -r -d 'User email address' -complete -c gitea -n '__fish_seen_subcommand_from create' -f -l admin -d 'User is an admin' -complete -c gitea -n '__fish_seen_subcommand_from create' -f -l random-password -d 'Generate a random password for the user' -complete -c gitea -n '__fish_seen_subcommand_from create' -f -l must-change-password -d 'User must change password after initial login, defaults to true for all users except the first one (can be disabled by --must-change-password=false)' -complete -c gitea -n '__fish_seen_subcommand_from create' -f -l random-password-length -r -d 'Length of the random password to be generated' -complete -c gitea -n '__fish_seen_subcommand_from create' -f -l access-token -d 'Generate access token for the user' -complete -c gitea -n '__fish_seen_subcommand_from create' -f -l access-token-name -r -d 'Name of the generated access token' -complete -c gitea -n '__fish_seen_subcommand_from create' -f -l access-token-scopes -r -d 'Scopes of the generated access token, comma separated. Examples: "all", "public-only,read:issue", "write:repository,write:user"' -complete -c gitea -n '__fish_seen_subcommand_from create' -f -l restricted -d 'Make a restricted user account' -complete -c gitea -n '__fish_seen_subcommand_from create' -f -l fullname -r -d 'The full, human-readable name of the user' -complete -c gitea -n '__fish_seen_subcommand_from create' -f -l help -s h -d 'show help' -complete -c gitea -n '__fish_seen_subcommand_from create' -f -l name -r -d 'Username. DEPRECATED: use username instead' -complete -c gitea -n '__fish_seen_subcommand_from create' -f -l username -r -d 'Username' -complete -x -c gitea -n '__fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from user; and not __fish_seen_subcommand_from create list change-password delete generate-access-token must-change-password help h' -a 'list' -d 'List users' -complete -c gitea -n '__fish_seen_subcommand_from list' -f -l admin -d 'List only admin users' -complete -c gitea -n '__fish_seen_subcommand_from list' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from user; and not __fish_seen_subcommand_from create list change-password delete generate-access-token must-change-password help h' -a 'change-password' -d 'Change a user\'s password' -complete -c gitea -n '__fish_seen_subcommand_from change-password' -f -l username -s u -r -d 'The user to change password for' -complete -c gitea -n '__fish_seen_subcommand_from change-password' -f -l password -s p -r -d 'New password to set for user' -complete -c gitea -n '__fish_seen_subcommand_from change-password' -f -l must-change-password -d 'User must change password (can be disabled by --must-change-password=false)' -complete -c gitea -n '__fish_seen_subcommand_from change-password' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from change-password; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from user; and not __fish_seen_subcommand_from create list change-password delete generate-access-token must-change-password help h' -a 'delete' -d 'Delete specific user by id, name or email' -complete -c gitea -n '__fish_seen_subcommand_from delete' -f -l id -r -d 'ID of user of the user to delete' -complete -c gitea -n '__fish_seen_subcommand_from delete' -f -l username -s u -r -d 'Username of the user to delete' -complete -c gitea -n '__fish_seen_subcommand_from delete' -f -l email -s e -r -d 'Email of the user to delete' -complete -c gitea -n '__fish_seen_subcommand_from delete' -f -l purge -d 'Purge user, all their repositories, organizations and comments' -complete -c gitea -n '__fish_seen_subcommand_from delete' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from delete; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from user; and not __fish_seen_subcommand_from create list change-password delete generate-access-token must-change-password help h' -a 'generate-access-token' -d 'Generate an access token for a specific user' -complete -c gitea -n '__fish_seen_subcommand_from generate-access-token' -f -l username -s u -r -d 'Username' -complete -c gitea -n '__fish_seen_subcommand_from generate-access-token' -f -l token-name -s t -r -d 'Token name' -complete -c gitea -n '__fish_seen_subcommand_from generate-access-token' -f -l raw -d 'Display only the token value' -complete -c gitea -n '__fish_seen_subcommand_from generate-access-token' -f -l scopes -r -d 'Comma separated list of scopes to apply to access token, examples: "all", "public-only,read:issue", "write:repository,write:user"' -complete -c gitea -n '__fish_seen_subcommand_from generate-access-token' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from generate-access-token; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from user; and not __fish_seen_subcommand_from create list change-password delete generate-access-token must-change-password help h' -a 'must-change-password' -d 'Set the must change password flag for the provided users or all users' -complete -c gitea -n '__fish_seen_subcommand_from must-change-password' -f -l all -s A -d 'All users must change password, except those explicitly excluded with --exclude' -complete -c gitea -n '__fish_seen_subcommand_from must-change-password' -f -l exclude -s e -r -d 'Do not change the must-change-password flag for these users' -complete -c gitea -n '__fish_seen_subcommand_from must-change-password' -f -l unset -d 'Instead of setting the must-change-password flag, unset it' -complete -c gitea -n '__fish_seen_subcommand_from must-change-password' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from must-change-password; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from user; and not __fish_seen_subcommand_from create list change-password delete generate-access-token must-change-password help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from admin; and not __fish_seen_subcommand_from user repo-sync-releases regenerate auth sendmail help h' -a 'repo-sync-releases' -d 'Synchronize repository releases with tags' -complete -c gitea -n '__fish_seen_subcommand_from repo-sync-releases' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from repo-sync-releases; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from admin; and not __fish_seen_subcommand_from user repo-sync-releases regenerate auth sendmail help h' -a 'regenerate' -d 'Regenerate specific files' -complete -c gitea -n '__fish_seen_subcommand_from regenerate' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from regenerate; and not __fish_seen_subcommand_from hooks keys help h' -a 'hooks' -d 'Regenerate git-hooks' -complete -c gitea -n '__fish_seen_subcommand_from hooks' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from hooks; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from regenerate; and not __fish_seen_subcommand_from hooks keys help h' -a 'keys' -d 'Regenerate authorized_keys file' -complete -c gitea -n '__fish_seen_subcommand_from keys' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from keys; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from regenerate; and not __fish_seen_subcommand_from hooks keys help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from admin; and not __fish_seen_subcommand_from user repo-sync-releases regenerate auth sendmail help h' -a 'auth' -d 'Modify external auth providers' -complete -c gitea -n '__fish_seen_subcommand_from auth' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from add-oauth update-oauth add-ldap update-ldap add-ldap-simple update-ldap-simple add-smtp update-smtp list delete help h' -a 'add-oauth' -d 'Add new Oauth authentication source' -complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l name -r -d 'Application Name' -complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l provider -r -d 'OAuth2 Provider' -complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l key -r -d 'Client ID (Key)' -complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l secret -r -d 'Client Secret' -complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l auto-discover-url -r -d 'OpenID Connect Auto Discovery URL (only required when using OpenID Connect as provider)' -complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l use-custom-urls -r -d 'Use custom URLs for GitLab/GitHub OAuth endpoints' -complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l custom-tenant-id -r -d 'Use custom Tenant ID for OAuth endpoints' -complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l custom-auth-url -r -d 'Use a custom Authorization URL (option for GitLab/GitHub)' -complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l custom-token-url -r -d 'Use a custom Token URL (option for GitLab/GitHub)' -complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l custom-profile-url -r -d 'Use a custom Profile URL (option for GitLab/GitHub)' -complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l custom-email-url -r -d 'Use a custom Email URL (option for GitHub)' -complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l icon-url -r -d 'Custom icon URL for OAuth2 login source' -complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l skip-local-2fa -d 'Set to true to skip local 2fa for users authenticated by this source' -complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l scopes -r -d 'Scopes to request when to authenticate against this OAuth2 source' -complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l required-claim-name -r -d 'Claim name that has to be set to allow users to login with this source' -complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l required-claim-value -r -d 'Claim value that has to be set to allow users to login with this source' -complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l group-claim-name -r -d 'Claim name providing group names for this source' -complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l admin-group -r -d 'Group Claim value for administrator users' -complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l restricted-group -r -d 'Group Claim value for restricted users' -complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l group-team-map -r -d 'JSON mapping between groups and org teams' -complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l group-team-map-removal -d 'Activate automatic team membership removal depending on groups' -complete -c gitea -n '__fish_seen_subcommand_from add-oauth' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from add-oauth; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from add-oauth update-oauth add-ldap update-ldap add-ldap-simple update-ldap-simple add-smtp update-smtp list delete help h' -a 'update-oauth' -d 'Update existing Oauth authentication source' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l name -r -d 'Application Name' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l id -r -d 'ID of authentication source' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l provider -r -d 'OAuth2 Provider' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l key -r -d 'Client ID (Key)' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l secret -r -d 'Client Secret' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l auto-discover-url -r -d 'OpenID Connect Auto Discovery URL (only required when using OpenID Connect as provider)' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l use-custom-urls -r -d 'Use custom URLs for GitLab/GitHub OAuth endpoints' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l custom-tenant-id -r -d 'Use custom Tenant ID for OAuth endpoints' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l custom-auth-url -r -d 'Use a custom Authorization URL (option for GitLab/GitHub)' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l custom-token-url -r -d 'Use a custom Token URL (option for GitLab/GitHub)' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l custom-profile-url -r -d 'Use a custom Profile URL (option for GitLab/GitHub)' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l custom-email-url -r -d 'Use a custom Email URL (option for GitHub)' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l icon-url -r -d 'Custom icon URL for OAuth2 login source' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l skip-local-2fa -d 'Set to true to skip local 2fa for users authenticated by this source' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l scopes -r -d 'Scopes to request when to authenticate against this OAuth2 source' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l required-claim-name -r -d 'Claim name that has to be set to allow users to login with this source' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l required-claim-value -r -d 'Claim value that has to be set to allow users to login with this source' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l group-claim-name -r -d 'Claim name providing group names for this source' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l admin-group -r -d 'Group Claim value for administrator users' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l restricted-group -r -d 'Group Claim value for restricted users' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l group-team-map -r -d 'JSON mapping between groups and org teams' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l group-team-map-removal -d 'Activate automatic team membership removal depending on groups' -complete -c gitea -n '__fish_seen_subcommand_from update-oauth' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from update-oauth; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from add-oauth update-oauth add-ldap update-ldap add-ldap-simple update-ldap-simple add-smtp update-smtp list delete help h' -a 'add-ldap' -d 'Add new LDAP (via Bind DN) authentication source' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l name -r -d 'Authentication name.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l not-active -d 'Deactivate the authentication source.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l active -d 'Activate the authentication source.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l security-protocol -r -d 'Security protocol name.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l skip-tls-verify -d 'Disable TLS verification.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l host -r -d 'The address where the LDAP server can be reached.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l port -r -d 'The port to use when connecting to the LDAP server.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l user-search-base -r -d 'The LDAP base at which user accounts will be searched for.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l user-filter -r -d 'An LDAP filter declaring how to find the user record that is attempting to authenticate.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l admin-filter -r -d 'An LDAP filter specifying if a user should be given administrator privileges.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l restricted-filter -r -d 'An LDAP filter specifying if a user should be given restricted status.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l allow-deactivate-all -d 'Allow empty search results to deactivate all users.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l username-attribute -r -d 'The attribute of the user’s LDAP record containing the user name.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l firstname-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s first name.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l surname-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s surname.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l email-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s email address.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l public-ssh-key-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s public ssh key.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l skip-local-2fa -d 'Set to true to skip local 2fa for users authenticated by this source' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l avatar-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s avatar.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l bind-dn -r -d 'The DN to bind to the LDAP server with when searching for the user.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l bind-password -r -d 'The password for the Bind DN, if any.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l attributes-in-bind -d 'Fetch attributes in bind DN context.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l synchronize-users -d 'Enable user synchronization.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l disable-synchronize-users -d 'Disable user synchronization.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l page-size -r -d 'Search page size.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l enable-groups -d 'Enable LDAP groups' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l group-search-base-dn -r -d 'The LDAP base DN at which group accounts will be searched for' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l group-member-attribute -r -d 'Group attribute containing list of users' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l group-user-attribute -r -d 'User attribute listed in group' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l group-filter -r -d 'Verify group membership in LDAP' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l group-team-map -r -d 'Map LDAP groups to Organization teams' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l group-team-map-removal -d 'Remove users from synchronized teams if user does not belong to corresponding LDAP group' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from add-ldap; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from add-oauth update-oauth add-ldap update-ldap add-ldap-simple update-ldap-simple add-smtp update-smtp list delete help h' -a 'update-ldap' -d 'Update existing LDAP (via Bind DN) authentication source' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l id -r -d 'ID of authentication source' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l name -r -d 'Authentication name.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l not-active -d 'Deactivate the authentication source.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l active -d 'Activate the authentication source.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l security-protocol -r -d 'Security protocol name.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l skip-tls-verify -d 'Disable TLS verification.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l host -r -d 'The address where the LDAP server can be reached.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l port -r -d 'The port to use when connecting to the LDAP server.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l user-search-base -r -d 'The LDAP base at which user accounts will be searched for.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l user-filter -r -d 'An LDAP filter declaring how to find the user record that is attempting to authenticate.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l admin-filter -r -d 'An LDAP filter specifying if a user should be given administrator privileges.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l restricted-filter -r -d 'An LDAP filter specifying if a user should be given restricted status.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l allow-deactivate-all -d 'Allow empty search results to deactivate all users.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l username-attribute -r -d 'The attribute of the user’s LDAP record containing the user name.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l firstname-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s first name.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l surname-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s surname.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l email-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s email address.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l public-ssh-key-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s public ssh key.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l skip-local-2fa -d 'Set to true to skip local 2fa for users authenticated by this source' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l avatar-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s avatar.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l bind-dn -r -d 'The DN to bind to the LDAP server with when searching for the user.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l bind-password -r -d 'The password for the Bind DN, if any.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l attributes-in-bind -d 'Fetch attributes in bind DN context.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l synchronize-users -d 'Enable user synchronization.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l disable-synchronize-users -d 'Disable user synchronization.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l page-size -r -d 'Search page size.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l enable-groups -d 'Enable LDAP groups' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l group-search-base-dn -r -d 'The LDAP base DN at which group accounts will be searched for' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l group-member-attribute -r -d 'Group attribute containing list of users' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l group-user-attribute -r -d 'User attribute listed in group' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l group-filter -r -d 'Verify group membership in LDAP' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l group-team-map -r -d 'Map LDAP groups to Organization teams' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l group-team-map-removal -d 'Remove users from synchronized teams if user does not belong to corresponding LDAP group' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from update-ldap; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from add-oauth update-oauth add-ldap update-ldap add-ldap-simple update-ldap-simple add-smtp update-smtp list delete help h' -a 'add-ldap-simple' -d 'Add new LDAP (simple auth) authentication source' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l name -r -d 'Authentication name.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l not-active -d 'Deactivate the authentication source.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l active -d 'Activate the authentication source.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l security-protocol -r -d 'Security protocol name.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l skip-tls-verify -d 'Disable TLS verification.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l host -r -d 'The address where the LDAP server can be reached.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l port -r -d 'The port to use when connecting to the LDAP server.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l user-search-base -r -d 'The LDAP base at which user accounts will be searched for.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l user-filter -r -d 'An LDAP filter declaring how to find the user record that is attempting to authenticate.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l admin-filter -r -d 'An LDAP filter specifying if a user should be given administrator privileges.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l restricted-filter -r -d 'An LDAP filter specifying if a user should be given restricted status.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l allow-deactivate-all -d 'Allow empty search results to deactivate all users.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l username-attribute -r -d 'The attribute of the user’s LDAP record containing the user name.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l firstname-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s first name.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l surname-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s surname.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l email-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s email address.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l public-ssh-key-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s public ssh key.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l skip-local-2fa -d 'Set to true to skip local 2fa for users authenticated by this source' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l avatar-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s avatar.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l user-dn -r -d 'The user\'s DN.' -complete -c gitea -n '__fish_seen_subcommand_from add-ldap-simple' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from add-ldap-simple; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from add-oauth update-oauth add-ldap update-ldap add-ldap-simple update-ldap-simple add-smtp update-smtp list delete help h' -a 'update-ldap-simple' -d 'Update existing LDAP (simple auth) authentication source' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l id -r -d 'ID of authentication source' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l name -r -d 'Authentication name.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l not-active -d 'Deactivate the authentication source.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l active -d 'Activate the authentication source.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l security-protocol -r -d 'Security protocol name.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l skip-tls-verify -d 'Disable TLS verification.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l host -r -d 'The address where the LDAP server can be reached.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l port -r -d 'The port to use when connecting to the LDAP server.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l user-search-base -r -d 'The LDAP base at which user accounts will be searched for.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l user-filter -r -d 'An LDAP filter declaring how to find the user record that is attempting to authenticate.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l admin-filter -r -d 'An LDAP filter specifying if a user should be given administrator privileges.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l restricted-filter -r -d 'An LDAP filter specifying if a user should be given restricted status.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l allow-deactivate-all -d 'Allow empty search results to deactivate all users.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l username-attribute -r -d 'The attribute of the user’s LDAP record containing the user name.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l firstname-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s first name.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l surname-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s surname.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l email-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s email address.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l public-ssh-key-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s public ssh key.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l skip-local-2fa -d 'Set to true to skip local 2fa for users authenticated by this source' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l avatar-attribute -r -d 'The attribute of the user’s LDAP record containing the user’s avatar.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l user-dn -r -d 'The user\'s DN.' -complete -c gitea -n '__fish_seen_subcommand_from update-ldap-simple' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from update-ldap-simple; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from add-oauth update-oauth add-ldap update-ldap add-ldap-simple update-ldap-simple add-smtp update-smtp list delete help h' -a 'add-smtp' -d 'Add new SMTP authentication source' -complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l name -r -d 'Application Name' -complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l auth-type -r -d 'SMTP Authentication Type (PLAIN/LOGIN/CRAM-MD5) default PLAIN' -complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l host -r -d 'SMTP Host' -complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l port -r -d 'SMTP Port' -complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l force-smtps -d 'SMTPS is always used on port 465. Set this to force SMTPS on other ports.' -complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l skip-verify -d 'Skip TLS verify.' -complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l helo-hostname -r -d 'Hostname sent with HELO. Leave blank to send current hostname' -complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l disable-helo -d 'Disable SMTP helo.' -complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l allowed-domains -r -d 'Leave empty to allow all domains. Separate multiple domains with a comma (\',\')' -complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l skip-local-2fa -d 'Skip 2FA to log on.' -complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l active -d 'This Authentication Source is Activated.' -complete -c gitea -n '__fish_seen_subcommand_from add-smtp' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from add-smtp; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from add-oauth update-oauth add-ldap update-ldap add-ldap-simple update-ldap-simple add-smtp update-smtp list delete help h' -a 'update-smtp' -d 'Update existing SMTP authentication source' -complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l name -r -d 'Application Name' -complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l id -r -d 'ID of authentication source' -complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l auth-type -r -d 'SMTP Authentication Type (PLAIN/LOGIN/CRAM-MD5) default PLAIN' -complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l host -r -d 'SMTP Host' -complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l port -r -d 'SMTP Port' -complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l force-smtps -d 'SMTPS is always used on port 465. Set this to force SMTPS on other ports.' -complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l skip-verify -d 'Skip TLS verify.' -complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l helo-hostname -r -d 'Hostname sent with HELO. Leave blank to send current hostname' -complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l disable-helo -d 'Disable SMTP helo.' -complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l allowed-domains -r -d 'Leave empty to allow all domains. Separate multiple domains with a comma (\',\')' -complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l skip-local-2fa -d 'Skip 2FA to log on.' -complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l active -d 'This Authentication Source is Activated.' -complete -c gitea -n '__fish_seen_subcommand_from update-smtp' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from update-smtp; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from add-oauth update-oauth add-ldap update-ldap add-ldap-simple update-ldap-simple add-smtp update-smtp list delete help h' -a 'list' -d 'List auth sources' -complete -c gitea -n '__fish_seen_subcommand_from list' -f -l min-width -r -d 'Minimal cell width including any padding for the formatted table' -complete -c gitea -n '__fish_seen_subcommand_from list' -f -l tab-width -r -d 'width of tab characters in formatted table (equivalent number of spaces)' -complete -c gitea -n '__fish_seen_subcommand_from list' -f -l padding -r -d 'padding added to a cell before computing its width' -complete -c gitea -n '__fish_seen_subcommand_from list' -f -l pad-char -r -d 'ASCII char used for padding if padchar == \'\\t\', the Writer will assume that the width of a \'\\t\' in the formatted output is tabwidth, and cells are left-aligned independent of align_left (for correct-looking results, tabwidth must correspond to the tab width in the viewer displaying the result)' -complete -c gitea -n '__fish_seen_subcommand_from list' -f -l vertical-bars -d 'Set to true to print vertical bars between columns' -complete -c gitea -n '__fish_seen_subcommand_from list' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from add-oauth update-oauth add-ldap update-ldap add-ldap-simple update-ldap-simple add-smtp update-smtp list delete help h' -a 'delete' -d 'Delete specific auth source' -complete -c gitea -n '__fish_seen_subcommand_from delete' -f -l id -r -d 'ID of authentication source' -complete -c gitea -n '__fish_seen_subcommand_from delete' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from delete; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from add-oauth update-oauth add-ldap update-ldap add-ldap-simple update-ldap-simple add-smtp update-smtp list delete help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from admin; and not __fish_seen_subcommand_from user repo-sync-releases regenerate auth sendmail help h' -a 'sendmail' -d 'Send a message to all users' -complete -c gitea -n '__fish_seen_subcommand_from sendmail' -f -l title -r -d 'a title of a message' -complete -c gitea -n '__fish_seen_subcommand_from sendmail' -f -l content -r -d 'a content of a message' -complete -c gitea -n '__fish_seen_subcommand_from sendmail' -f -l force -s f -d 'A flag to bypass a confirmation step' -complete -c gitea -n '__fish_seen_subcommand_from sendmail' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from sendmail; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from admin; and not __fish_seen_subcommand_from user repo-sync-releases regenerate auth sendmail help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'migrate' -d 'Migrate the database' -complete -c gitea -n '__fish_seen_subcommand_from migrate' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from migrate; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'doctor' -d 'Diagnose and optionally fix problems, convert or re-create database tables' -complete -c gitea -n '__fish_seen_subcommand_from doctor' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from doctor; and not __fish_seen_subcommand_from check recreate-table convert help h' -a 'check' -d 'Diagnose and optionally fix problems' -complete -c gitea -n '__fish_seen_subcommand_from check' -f -l list -d 'List the available checks' -complete -c gitea -n '__fish_seen_subcommand_from check' -f -l default -d 'Run the default checks (if neither --run or --all is set, this is the default behaviour)' -complete -c gitea -n '__fish_seen_subcommand_from check' -f -l run -r -d 'Run the provided checks - (if --default is set, the default checks will also run)' -complete -c gitea -n '__fish_seen_subcommand_from check' -f -l all -d 'Run all the available checks' -complete -c gitea -n '__fish_seen_subcommand_from check' -f -l fix -d 'Automatically fix what we can' -complete -c gitea -n '__fish_seen_subcommand_from check' -f -l log-file -r -d 'Name of the log file (no verbose log output by default). Set to "-" to output to stdout' -complete -c gitea -n '__fish_seen_subcommand_from check' -f -l color -s H -d 'Use color for outputted information' -complete -c gitea -n '__fish_seen_subcommand_from check' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from check; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from doctor; and not __fish_seen_subcommand_from check recreate-table convert help h' -a 'recreate-table' -d 'Recreate tables from XORM definitions and copy the data.' -complete -c gitea -n '__fish_seen_subcommand_from recreate-table' -f -l debug -d 'Print SQL commands sent' -complete -c gitea -n '__fish_seen_subcommand_from recreate-table' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from recreate-table; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from doctor; and not __fish_seen_subcommand_from check recreate-table convert help h' -a 'convert' -d 'Convert the database' -complete -c gitea -n '__fish_seen_subcommand_from convert' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from convert; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from doctor; and not __fish_seen_subcommand_from check recreate-table convert help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'manager' -d 'Manage the running gitea process' -complete -c gitea -n '__fish_seen_subcommand_from manager' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from manager; and not __fish_seen_subcommand_from shutdown restart reload-templates flush-queues logging processes help h' -a 'shutdown' -d 'Gracefully shutdown the running process' -complete -c gitea -n '__fish_seen_subcommand_from shutdown' -f -l debug -complete -c gitea -n '__fish_seen_subcommand_from shutdown' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from shutdown; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from manager; and not __fish_seen_subcommand_from shutdown restart reload-templates flush-queues logging processes help h' -a 'restart' -d 'Gracefully restart the running process - (not implemented for windows servers)' -complete -c gitea -n '__fish_seen_subcommand_from restart' -f -l debug -complete -c gitea -n '__fish_seen_subcommand_from restart' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from restart; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from manager; and not __fish_seen_subcommand_from shutdown restart reload-templates flush-queues logging processes help h' -a 'reload-templates' -d 'Reload template files in the running process' -complete -c gitea -n '__fish_seen_subcommand_from reload-templates' -f -l debug -complete -c gitea -n '__fish_seen_subcommand_from reload-templates' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from reload-templates; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from manager; and not __fish_seen_subcommand_from shutdown restart reload-templates flush-queues logging processes help h' -a 'flush-queues' -d 'Flush queues in the running process' -complete -c gitea -n '__fish_seen_subcommand_from flush-queues' -f -l timeout -r -d 'Timeout for the flushing process' -complete -c gitea -n '__fish_seen_subcommand_from flush-queues' -f -l non-blocking -d 'Set to true to not wait for flush to complete before returning' -complete -c gitea -n '__fish_seen_subcommand_from flush-queues' -f -l debug -complete -c gitea -n '__fish_seen_subcommand_from flush-queues' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from flush-queues; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from manager; and not __fish_seen_subcommand_from shutdown restart reload-templates flush-queues logging processes help h' -a 'logging' -d 'Adjust logging commands' -complete -c gitea -n '__fish_seen_subcommand_from logging' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from logging; and not __fish_seen_subcommand_from pause resume release-and-reopen remove add log-sql help h' -a 'pause' -d 'Pause logging (Gitea will buffer logs up to a certain point and will drop them after that point)' -complete -c gitea -n '__fish_seen_subcommand_from pause' -f -l debug -complete -c gitea -n '__fish_seen_subcommand_from pause' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from pause; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from logging; and not __fish_seen_subcommand_from pause resume release-and-reopen remove add log-sql help h' -a 'resume' -d 'Resume logging' -complete -c gitea -n '__fish_seen_subcommand_from resume' -f -l debug -complete -c gitea -n '__fish_seen_subcommand_from resume' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from resume; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from logging; and not __fish_seen_subcommand_from pause resume release-and-reopen remove add log-sql help h' -a 'release-and-reopen' -d 'Cause Gitea to release and re-open files used for logging' -complete -c gitea -n '__fish_seen_subcommand_from release-and-reopen' -f -l debug -complete -c gitea -n '__fish_seen_subcommand_from release-and-reopen' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from release-and-reopen; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from logging; and not __fish_seen_subcommand_from pause resume release-and-reopen remove add log-sql help h' -a 'remove' -d 'Remove a logger' -complete -c gitea -n '__fish_seen_subcommand_from remove' -f -l debug -complete -c gitea -n '__fish_seen_subcommand_from remove' -f -l logger -r -d 'Logger name - will default to "default"' -complete -c gitea -n '__fish_seen_subcommand_from remove' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from remove; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from logging; and not __fish_seen_subcommand_from pause resume release-and-reopen remove add log-sql help h' -a 'add' -d 'Add a logger' -complete -c gitea -n '__fish_seen_subcommand_from add' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from add; and not __fish_seen_subcommand_from file conn help h' -a 'file' -d 'Add a file logger' -complete -c gitea -n '__fish_seen_subcommand_from file' -f -l logger -r -d 'Logger name - will default to "default"' -complete -c gitea -n '__fish_seen_subcommand_from file' -f -l writer -r -d 'Name of the log writer - will default to mode' -complete -c gitea -n '__fish_seen_subcommand_from file' -f -l level -r -d 'Logging level for the new logger' -complete -c gitea -n '__fish_seen_subcommand_from file' -f -l stacktrace-level -s L -r -d 'Stacktrace logging level' -complete -c gitea -n '__fish_seen_subcommand_from file' -f -l flags -s F -r -d 'Flags for the logger' -complete -c gitea -n '__fish_seen_subcommand_from file' -f -l expression -s e -r -d 'Matching expression for the logger' -complete -c gitea -n '__fish_seen_subcommand_from file' -f -l prefix -s p -r -d 'Prefix for the logger' -complete -c gitea -n '__fish_seen_subcommand_from file' -f -l color -d 'Use color in the logs' -complete -c gitea -n '__fish_seen_subcommand_from file' -f -l debug -complete -c gitea -n '__fish_seen_subcommand_from file' -f -l filename -s f -r -d 'Filename for the logger - this must be set.' -complete -c gitea -n '__fish_seen_subcommand_from file' -f -l rotate -s r -d 'Rotate logs' -complete -c gitea -n '__fish_seen_subcommand_from file' -f -l max-size -s s -r -d 'Maximum size in bytes before rotation' -complete -c gitea -n '__fish_seen_subcommand_from file' -f -l daily -s d -d 'Rotate logs daily' -complete -c gitea -n '__fish_seen_subcommand_from file' -f -l max-days -s D -r -d 'Maximum number of daily logs to keep' -complete -c gitea -n '__fish_seen_subcommand_from file' -f -l compress -s z -d 'Compress rotated logs' -complete -c gitea -n '__fish_seen_subcommand_from file' -f -l compression-level -s Z -r -d 'Compression level to use' -complete -c gitea -n '__fish_seen_subcommand_from file' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from file; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from add; and not __fish_seen_subcommand_from file conn help h' -a 'conn' -d 'Add a net conn logger' -complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l logger -r -d 'Logger name - will default to "default"' -complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l writer -r -d 'Name of the log writer - will default to mode' -complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l level -r -d 'Logging level for the new logger' -complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l stacktrace-level -s L -r -d 'Stacktrace logging level' -complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l flags -s F -r -d 'Flags for the logger' -complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l expression -s e -r -d 'Matching expression for the logger' -complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l prefix -s p -r -d 'Prefix for the logger' -complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l color -d 'Use color in the logs' -complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l debug -complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l reconnect-on-message -s R -d 'Reconnect to host for every message' -complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l reconnect -s r -d 'Reconnect to host when connection is dropped' -complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l protocol -s P -r -d 'Set protocol to use: tcp, unix, or udp (defaults to tcp)' -complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l address -s a -r -d 'Host address and port to connect to (defaults to :7020)' -complete -c gitea -n '__fish_seen_subcommand_from conn' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from conn; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from add; and not __fish_seen_subcommand_from file conn help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from logging; and not __fish_seen_subcommand_from pause resume release-and-reopen remove add log-sql help h' -a 'log-sql' -d 'Set LogSQL' -complete -c gitea -n '__fish_seen_subcommand_from log-sql' -f -l debug -complete -c gitea -n '__fish_seen_subcommand_from log-sql' -f -l off -d 'Switch off SQL logging' -complete -c gitea -n '__fish_seen_subcommand_from log-sql' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from log-sql; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from logging; and not __fish_seen_subcommand_from pause resume release-and-reopen remove add log-sql help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from manager; and not __fish_seen_subcommand_from shutdown restart reload-templates flush-queues logging processes help h' -a 'processes' -d 'Display running processes within the current process' -complete -c gitea -n '__fish_seen_subcommand_from processes' -f -l debug -complete -c gitea -n '__fish_seen_subcommand_from processes' -f -l flat -d 'Show processes as flat table rather than as tree' -complete -c gitea -n '__fish_seen_subcommand_from processes' -f -l no-system -d 'Do not show system processes' -complete -c gitea -n '__fish_seen_subcommand_from processes' -f -l stacktraces -d 'Show stacktraces' -complete -c gitea -n '__fish_seen_subcommand_from processes' -f -l json -d 'Output as json' -complete -c gitea -n '__fish_seen_subcommand_from processes' -f -l cancel -r -d 'Process PID to cancel. (Only available for non-system processes.)' -complete -c gitea -n '__fish_seen_subcommand_from processes' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from processes; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from manager; and not __fish_seen_subcommand_from shutdown restart reload-templates flush-queues logging processes help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'embedded' -d 'Extract embedded resources' -complete -c gitea -n '__fish_seen_subcommand_from embedded' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from embedded; and not __fish_seen_subcommand_from list view extract help h' -a 'list' -d 'List files matching the given pattern' -complete -c gitea -n '__fish_seen_subcommand_from list' -f -l include-vendored -s vendor -d 'Include files under public/vendor as well' -complete -c gitea -n '__fish_seen_subcommand_from list' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from embedded; and not __fish_seen_subcommand_from list view extract help h' -a 'view' -d 'View a file matching the given pattern' -complete -c gitea -n '__fish_seen_subcommand_from view' -f -l include-vendored -s vendor -d 'Include files under public/vendor as well' -complete -c gitea -n '__fish_seen_subcommand_from view' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from view; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from embedded; and not __fish_seen_subcommand_from list view extract help h' -a 'extract' -d 'Extract resources' -complete -c gitea -n '__fish_seen_subcommand_from extract' -f -l include-vendored -s vendor -d 'Include files under public/vendor as well' -complete -c gitea -n '__fish_seen_subcommand_from extract' -f -l overwrite -d 'Overwrite files if they already exist' -complete -c gitea -n '__fish_seen_subcommand_from extract' -f -l rename -d 'Rename files as {name}.bak if they already exist (overwrites previous .bak)' -complete -c gitea -n '__fish_seen_subcommand_from extract' -f -l custom -d 'Extract to the \'custom\' directory as per app.ini' -complete -c gitea -n '__fish_seen_subcommand_from extract' -f -l destination -s dest-dir -r -d 'Extract to the specified directory' -complete -c gitea -n '__fish_seen_subcommand_from extract' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from extract; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from embedded; and not __fish_seen_subcommand_from list view extract help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'migrate-storage' -d 'Migrate the storage' -complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l type -s t -r -d 'Type of stored files to copy. Allowed types: \'attachments\', \'lfs\', \'avatars\', \'repo-avatars\', \'repo-archivers\', \'packages\', \'actions-log\', \'actions-artifacts' -complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l storage -s s -r -d 'New storage type: local (default), minio or azureblob' -complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l path -s p -r -d 'New storage placement if store is local (leave blank for default)' -complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l minio-endpoint -r -d 'Minio storage endpoint' -complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l minio-access-key-id -r -d 'Minio storage accessKeyID' -complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l minio-secret-access-key -r -d 'Minio storage secretAccessKey' -complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l minio-bucket -r -d 'Minio storage bucket' -complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l minio-location -r -d 'Minio storage location to create bucket' -complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l minio-base-path -r -d 'Minio storage base path on the bucket' -complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l minio-use-ssl -d 'Enable SSL for minio' -complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l minio-insecure-skip-verify -d 'Skip SSL verification' -complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l minio-checksum-algorithm -r -d 'Minio checksum algorithm (default/md5)' -complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l minio-bucket-lookup-type -r -d 'Minio bucket lookup type' -complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l azureblob-endpoint -r -d 'Azure Blob storage endpoint' -complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l azureblob-account-name -r -d 'Azure Blob storage account name' -complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l azureblob-account-key -r -d 'Azure Blob storage account key' -complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l azureblob-container -r -d 'Azure Blob storage container' -complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l azureblob-base-path -r -d 'Azure Blob storage base path' -complete -c gitea -n '__fish_seen_subcommand_from migrate-storage' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from migrate-storage; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'dump-repo' -d 'Dump the repository from git/github/gitea/gitlab' -complete -c gitea -n '__fish_seen_subcommand_from dump-repo' -f -l git_service -r -d 'Git service, git, github, gitea, gitlab. If clone_addr could be recognized, this could be ignored.' -complete -c gitea -n '__fish_seen_subcommand_from dump-repo' -f -l repo_dir -s r -r -d 'Repository dir path to store the data' -complete -c gitea -n '__fish_seen_subcommand_from dump-repo' -f -l clone_addr -r -d 'The URL will be clone, currently could be a git/github/gitea/gitlab http/https URL' -complete -c gitea -n '__fish_seen_subcommand_from dump-repo' -f -l auth_username -r -d 'The username to visit the clone_addr' -complete -c gitea -n '__fish_seen_subcommand_from dump-repo' -f -l auth_password -r -d 'The password to visit the clone_addr' -complete -c gitea -n '__fish_seen_subcommand_from dump-repo' -f -l auth_token -r -d 'The personal token to visit the clone_addr' -complete -c gitea -n '__fish_seen_subcommand_from dump-repo' -f -l owner_name -r -d 'The data will be stored on a directory with owner name if not empty' -complete -c gitea -n '__fish_seen_subcommand_from dump-repo' -f -l repo_name -r -d 'The data will be stored on a directory with repository name if not empty' -complete -c gitea -n '__fish_seen_subcommand_from dump-repo' -f -l units -r -d 'Which items will be migrated, one or more units should be separated as comma. -wiki, issues, labels, releases, release_assets, milestones, pull_requests, comments are allowed. Empty means all units.' -complete -c gitea -n '__fish_seen_subcommand_from dump-repo' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from dump-repo; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'restore-repo' -d 'Restore the repository from disk' -complete -c gitea -n '__fish_seen_subcommand_from restore-repo' -f -l repo_dir -s r -r -d 'Repository dir path to restore from' -complete -c gitea -n '__fish_seen_subcommand_from restore-repo' -f -l owner_name -r -d 'Restore destination owner name' -complete -c gitea -n '__fish_seen_subcommand_from restore-repo' -f -l repo_name -r -d 'Restore destination repository name' -complete -c gitea -n '__fish_seen_subcommand_from restore-repo' -f -l units -r -d 'Which items will be restored, one or more units should be separated as comma. -wiki, issues, labels, releases, release_assets, milestones, pull_requests, comments are allowed. Empty means all units.' -complete -c gitea -n '__fish_seen_subcommand_from restore-repo' -f -l validation -d 'Sanity check the content of the files before trying to load them' -complete -c gitea -n '__fish_seen_subcommand_from restore-repo' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from restore-repo; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'actions' -d 'Manage Gitea Actions' -complete -c gitea -n '__fish_seen_subcommand_from actions' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from actions; and not __fish_seen_subcommand_from generate-runner-token grt help h' -a 'generate-runner-token' -d 'Generate a new token for a runner to use to register with the server' -complete -c gitea -n '__fish_seen_subcommand_from generate-runner-token grt' -f -l scope -s s -r -d '{owner}[/{repo}] - leave empty for a global runner' -complete -c gitea -n '__fish_seen_subcommand_from generate-runner-token grt' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from generate-runner-token grt; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from actions; and not __fish_seen_subcommand_from generate-runner-token grt help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'cert' -d 'Generate self-signed certificate' -complete -c gitea -n '__fish_seen_subcommand_from cert' -f -l host -r -d 'Comma-separated hostnames and IPs to generate a certificate for' -complete -c gitea -n '__fish_seen_subcommand_from cert' -f -l ecdsa-curve -r -d 'ECDSA curve to use to generate a key. Valid values are P224, P256, P384, P521' -complete -c gitea -n '__fish_seen_subcommand_from cert' -f -l rsa-bits -r -d 'Size of RSA key to generate. Ignored if --ecdsa-curve is set' -complete -c gitea -n '__fish_seen_subcommand_from cert' -f -l start-date -r -d 'Creation date formatted as Jan 1 15:04:05 2011' -complete -c gitea -n '__fish_seen_subcommand_from cert' -f -l duration -r -d 'Duration that certificate is valid for' -complete -c gitea -n '__fish_seen_subcommand_from cert' -f -l ca -d 'whether this cert should be its own Certificate Authority' -complete -c gitea -n '__fish_seen_subcommand_from cert' -f -l out -r -d 'Path to the file where there certificate will be saved' -complete -c gitea -n '__fish_seen_subcommand_from cert' -f -l keyout -r -d 'Path to the file where there certificate key will be saved' -complete -c gitea -n '__fish_seen_subcommand_from cert' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from cert; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'generate' -d 'Generate Gitea\'s secrets/keys/tokens' -complete -c gitea -n '__fish_seen_subcommand_from generate' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from generate; and not __fish_seen_subcommand_from secret help h' -a 'secret' -d 'Generate a secret token' -complete -c gitea -n '__fish_seen_subcommand_from secret' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from secret; and not __fish_seen_subcommand_from INTERNAL_TOKEN JWT_SECRET LFS_JWT_SECRET SECRET_KEY help h' -a 'INTERNAL_TOKEN' -d 'Generate a new INTERNAL_TOKEN' -complete -c gitea -n '__fish_seen_subcommand_from INTERNAL_TOKEN' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from INTERNAL_TOKEN; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from secret; and not __fish_seen_subcommand_from INTERNAL_TOKEN JWT_SECRET LFS_JWT_SECRET SECRET_KEY help h' -a 'JWT_SECRET' -d 'Generate a new JWT_SECRET' -complete -c gitea -n '__fish_seen_subcommand_from JWT_SECRET LFS_JWT_SECRET' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from JWT_SECRET LFS_JWT_SECRET; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from secret; and not __fish_seen_subcommand_from INTERNAL_TOKEN JWT_SECRET LFS_JWT_SECRET SECRET_KEY help h' -a 'SECRET_KEY' -d 'Generate a new SECRET_KEY' -complete -c gitea -n '__fish_seen_subcommand_from SECRET_KEY' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from SECRET_KEY; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from secret; and not __fish_seen_subcommand_from INTERNAL_TOKEN JWT_SECRET LFS_JWT_SECRET SECRET_KEY help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_seen_subcommand_from generate; and not __fish_seen_subcommand_from secret help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'docs' -d 'Output CLI documentation' -complete -c gitea -n '__fish_seen_subcommand_from docs' -f -l man -d 'Output man pages instead' -complete -c gitea -n '__fish_seen_subcommand_from docs' -f -l output -s o -r -d 'Path to output to instead of stdout (will overwrite if exists)' -complete -c gitea -n '__fish_seen_subcommand_from docs' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from docs; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -c gitea -n '__fish_seen_subcommand_from completion' -f -l help -s h -d 'show help' -complete -x -c gitea -n '__fish_seen_subcommand_from completion; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' diff --git a/contrib/autocompletion/zsh_autocomplete b/contrib/autocompletion/zsh_autocomplete deleted file mode 100644 index 2273a137ef53f..0000000000000 --- a/contrib/autocompletion/zsh_autocomplete +++ /dev/null @@ -1,29 +0,0 @@ -#compdef gitea -compdef _gitea gitea - -# This is a shell completion script auto-generated by https://github.com/urfave/cli for zsh. - -_gitea() { - local -a opts # Declare a local array - local current - current=${words[-1]} # -1 means "the last element" - if [[ "$current" == "-"* ]]; then - # Current word starts with a hyphen, so complete flags/options - opts=("${(@f)$(${words[@]:0:#words[@]-1} ${current} --generate-shell-completion)}") - else - # Current word does not start with a hyphen, so complete subcommands - opts=("${(@f)$(${words[@]:0:#words[@]-1} --generate-shell-completion)}") - fi - - if [[ "${opts[1]}" != "" ]]; then - _describe 'values' opts - else - _files - fi -} - -# Don't run the completion function when being source-ed or eval-ed. -# See https://github.com/urfave/cli/issues/1874 for discussion. -if [ "$funcstack[1]" = "_gitea" ]; then - _gitea -fi From 890f1eefb5ebb37ae57ceac8d118e81e33ddd273 Mon Sep 17 00:00:00 2001 From: TheFox0x7 Date: Sun, 6 Jul 2025 16:16:58 +0200 Subject: [PATCH 12/15] wrap the original cli function instead of replacing it --- cmd/main.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index 0120ec3d500b9..49252f004673d 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -46,11 +46,16 @@ DEFAULT CONFIGURATION: } func prepareSubcommandWithGlobalFlags(command *cli.Command) { - command.Before = prepareWorkPathAndCustomConf() + command.Before = prepareWorkPathAndCustomConf(command.Before) } // prepareWorkPathAndCustomConf wraps the Action to prepare the work path and custom config -func prepareWorkPathAndCustomConf() cli.BeforeFunc { +func prepareWorkPathAndCustomConf(original cli.BeforeFunc) cli.BeforeFunc { + if original == nil { + original = func(ctx context.Context, c *cli.Command) (context.Context, error) { + return ctx, nil + } + } return func(ctx context.Context, cmd *cli.Command) (context.Context, error) { var args setting.ArgWorkPathAndCustomConf if cmd.IsSet("work-path") { @@ -63,7 +68,7 @@ func prepareWorkPathAndCustomConf() cli.BeforeFunc { args.CustomConf = cmd.String("config") } setting.InitWorkPathAndCommonConfig(os.Getenv, args) - return ctx, nil + return original(ctx, cmd) } } From bf7265c20171892fca52611035f1d79326083a63 Mon Sep 17 00:00:00 2001 From: TheFox0x7 Date: Wed, 9 Jul 2025 21:21:07 +0200 Subject: [PATCH 13/15] reorder flags work-path first, then config, then custom path --- cmd/main.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index 49252f004673d..63b26b59807ff 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -86,10 +86,10 @@ func NewMainApp(appVer AppVersion) *cli.Command { app.EnableShellCompletion = true app.Flags = []cli.Flag{ &cli.StringFlag{ - Name: "custom-path", - Aliases: []string{"C"}, + Name: "work-path", + Aliases: []string{"w"}, TakesFile: true, - Usage: "Set custom path (defaults to '{WorkPath}/custom')", + Usage: "Set Gitea's working path (defaults to the Gitea's binary directory)", }, &cli.StringFlag{ Name: "config", @@ -99,10 +99,10 @@ func NewMainApp(appVer AppVersion) *cli.Command { Usage: "Set custom config file (defaults to '{WorkPath}/custom/conf/app.ini')", }, &cli.StringFlag{ - Name: "work-path", - Aliases: []string{"w"}, + Name: "custom-path", + Aliases: []string{"C"}, TakesFile: true, - Usage: "Set Gitea's working path (defaults to the Gitea's binary directory)", + Usage: "Set custom path (defaults to '{WorkPath}/custom')", }, } // these sub-commands need to use config file From f4531b633217704fa5ddc1042997a5c0e19ce864 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Thu, 10 Jul 2025 17:19:20 +0800 Subject: [PATCH 14/15] improve --- cmd/main.go | 88 +++++++++++++++++++++++++++-------------------------- 1 file changed, 45 insertions(+), 43 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index 63b26b59807ff..bb466c715b733 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -6,6 +6,7 @@ package cmd import ( "context" "fmt" + "io" "os" "strings" @@ -15,22 +16,28 @@ import ( "github.com/urfave/cli/v3" ) -// cmdHelp is our own help subcommand with more information -// Keep in mind that the "./gitea help"(subcommand) is different from "./gitea --help"(flag), the flag doesn't parse the config or output "DEFAULT CONFIGURATION:" information -func cmdHelp() *cli.Command { - c := &cli.Command{ - Name: "help", - Aliases: []string{"h"}, - Usage: "Shows a list of commands or help for one command", - ArgsUsage: "[command]", - Action: func(ctx context.Context, c *cli.Command) (err error) { - if !c.Args().Present() { - err = cli.ShowAppHelp(c.Root()) - } else { - err = cli.ShowCommandHelp(ctx, c.Root(), c.Args().First()) - } - if err == nil { - _, _ = fmt.Fprintf(c.Root().Writer, ` +var cliHelpPrinterOld = cli.HelpPrinter + +func init() { + cli.HelpPrinter = cliHelpPrinterNew +} + +// cliHelpPrinterNew helps to print "DEFAULT CONFIGURATION" for the following cases ( "-c" can apper in any position): +// * ./gitea -c /dev/null -h +// * ./gitea -c help /dev/null help +// * ./gitea help -c /dev/null +// * ./gitea help -c /dev/null web +// * ./gitea help web -c /dev/null +// * ./gitea web help -c /dev/null +// * ./gitea web -h -c /dev/null +func cliHelpPrinterNew(out io.Writer, templ string, data interface{}) { + cmd, _ := data.(*cli.Command) + if cmd != nil { + prepareWorkPathAndCustomConf(cmd) + } + cliHelpPrinterOld(out, templ, data) + if setting.CustomConf != "" { + _, _ = fmt.Fprintf(out, ` DEFAULT CONFIGURATION: AppPath: %s WorkPath: %s @@ -38,38 +45,34 @@ DEFAULT CONFIGURATION: ConfigFile: %s `, setting.AppPath, setting.AppWorkPath, setting.CustomPath, setting.CustomConf) - } - return err - }, } - return c } -func prepareSubcommandWithGlobalFlags(command *cli.Command) { - command.Before = prepareWorkPathAndCustomConf(command.Before) +func prepareSubcommandWithGlobalFlags(originCmd *cli.Command) { + originBefore := originCmd.Before + originCmd.Before = func(ctx context.Context, cmd *cli.Command) (context.Context, error) { + prepareWorkPathAndCustomConf(cmd) + if originBefore != nil { + return originBefore(ctx, cmd) + } + return ctx, nil + } } -// prepareWorkPathAndCustomConf wraps the Action to prepare the work path and custom config -func prepareWorkPathAndCustomConf(original cli.BeforeFunc) cli.BeforeFunc { - if original == nil { - original = func(ctx context.Context, c *cli.Command) (context.Context, error) { - return ctx, nil - } +// prepareWorkPathAndCustomConf tries to prepare the work path, custom path and custom config from various inputs: +// command line flags, environment variables, config file +func prepareWorkPathAndCustomConf(cmd *cli.Command) { + var args setting.ArgWorkPathAndCustomConf + if cmd.IsSet("work-path") { + args.WorkPath = cmd.String("work-path") } - return func(ctx context.Context, cmd *cli.Command) (context.Context, error) { - var args setting.ArgWorkPathAndCustomConf - if cmd.IsSet("work-path") { - args.WorkPath = cmd.String("work-path") - } - if cmd.IsSet("custom-path") { - args.CustomPath = cmd.String("custom-path") - } - if cmd.IsSet("config") { - args.CustomConf = cmd.String("config") - } - setting.InitWorkPathAndCommonConfig(os.Getenv, args) - return original(ctx, cmd) + if cmd.IsSet("custom-path") { + args.CustomPath = cmd.String("custom-path") + } + if cmd.IsSet("config") { + args.CustomConf = cmd.String("config") } + setting.InitWorkPathAndCommonConfig(os.Getenv, args) } type AppVersion struct { @@ -105,9 +108,8 @@ func NewMainApp(appVer AppVersion) *cli.Command { Usage: "Set custom path (defaults to '{WorkPath}/custom')", }, } - // these sub-commands need to use config file + // these sub-commands need to use a config file subCmdWithConfig := []*cli.Command{ - cmdHelp(), // the "help" sub-command was used to show the more information for "work path" and "custom config" CmdWeb, CmdServ, CmdHook, From 1e11673028a3095979463baebe60951b5059bf5d Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Thu, 10 Jul 2025 18:16:47 +0800 Subject: [PATCH 15/15] add tests --- cmd/main.go | 2 +- cmd/main_test.go | 46 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index bb466c715b733..3fdaf48ed9665 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -30,7 +30,7 @@ func init() { // * ./gitea help web -c /dev/null // * ./gitea web help -c /dev/null // * ./gitea web -h -c /dev/null -func cliHelpPrinterNew(out io.Writer, templ string, data interface{}) { +func cliHelpPrinterNew(out io.Writer, templ string, data any) { cmd, _ := data.(*cli.Command) if cmd != nil { prepareWorkPathAndCustomConf(cmd) diff --git a/cmd/main_test.go b/cmd/main_test.go index 7dfa87a0ef042..d49ebfd4df41d 100644 --- a/cmd/main_test.go +++ b/cmd/main_test.go @@ -74,12 +74,56 @@ func TestCliCmd(t *testing.T) { cmd string exp string }{ - // main command help + // help commands + { + cmd: "./gitea -h", + exp: "DEFAULT CONFIGURATION:", + }, { cmd: "./gitea help", exp: "DEFAULT CONFIGURATION:", }, + { + cmd: "./gitea -c /dev/null -h", + exp: "ConfigFile: /dev/null", + }, + + { + cmd: "./gitea -c /dev/null help", + exp: "ConfigFile: /dev/null", + }, + { + cmd: "./gitea help -c /dev/null", + exp: "ConfigFile: /dev/null", + }, + + { + cmd: "./gitea -c /dev/null test-cmd -h", + exp: "ConfigFile: /dev/null", + }, + { + cmd: "./gitea test-cmd -c /dev/null -h", + exp: "ConfigFile: /dev/null", + }, + { + cmd: "./gitea test-cmd -h -c /dev/null", + exp: "ConfigFile: /dev/null", + }, + + { + cmd: "./gitea -c /dev/null test-cmd help", + exp: "ConfigFile: /dev/null", + }, + { + cmd: "./gitea test-cmd -c /dev/null help", + exp: "ConfigFile: /dev/null", + }, + { + cmd: "./gitea test-cmd help -c /dev/null", + exp: "ConfigFile: /dev/null", + }, + // parse paths { cmd: "./gitea test-cmd",