Skip to content

Commit 44db958

Browse files
committed
add file hint for config settings
1 parent 4a25324 commit 44db958

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

cmd/main.go

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,23 @@ func NewMainApp(appVer AppVersion) *cli.Command {
8181
app.EnableShellCompletion = true
8282
app.Flags = []cli.Flag{
8383
&cli.StringFlag{
84-
Name: "custom-path",
85-
Aliases: []string{"C"},
86-
Usage: "Set custom path (defaults to '{WorkPath}/custom')",
84+
Name: "custom-path",
85+
Aliases: []string{"C"},
86+
TakesFile: true,
87+
Usage: "Set custom path (defaults to '{WorkPath}/custom')",
8788
},
8889
&cli.StringFlag{
89-
Name: "config",
90-
Aliases: []string{"c"},
91-
Value: setting.CustomConf,
92-
Usage: "Set custom config file (defaults to '{WorkPath}/custom/conf/app.ini')",
90+
Name: "config",
91+
Aliases: []string{"c"},
92+
TakesFile: true,
93+
Value: setting.CustomConf,
94+
Usage: "Set custom config file (defaults to '{WorkPath}/custom/conf/app.ini')",
9395
},
9496
&cli.StringFlag{
95-
Name: "work-path",
96-
Aliases: []string{"w"},
97-
Usage: "Set Gitea's working path (defaults to the Gitea's binary directory)",
97+
Name: "work-path",
98+
Aliases: []string{"w"},
99+
TakesFile: true,
100+
Usage: "Set Gitea's working path (defaults to the Gitea's binary directory)",
98101
},
99102
}
100103
// these sub-commands need to use config file

contrib/autocompletion/gitea.fish

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ function __fish_gitea_no_subcommand --description 'Test if there has been any su
99
return 0
1010
end
1111

12-
complete -c gitea -n '__fish_gitea_no_subcommand' -f -l custom-path -s C -r -d 'Set custom path (defaults to \'{WorkPath}/custom\')'
13-
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\')'
14-
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)'
12+
complete -c gitea -n '__fish_gitea_no_subcommand' -l custom-path -s C -r -d 'Set custom path (defaults to \'{WorkPath}/custom\')'
13+
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\')'
14+
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)'
1515
complete -c gitea -n '__fish_gitea_no_subcommand' -f -l help -s h -d 'show help'
1616
complete -c gitea -n '__fish_gitea_no_subcommand' -f -l version -s v -d 'print the version'
1717
complete -x -c gitea -n '__fish_gitea_no_subcommand' -a 'help' -d 'Shows a list of commands or help for one command'

0 commit comments

Comments
 (0)