diff --git a/internal/cmd/fetch.go b/internal/cmd/fetch.go index d6fe5e8..53c54a7 100644 --- a/internal/cmd/fetch.go +++ b/internal/cmd/fetch.go @@ -87,10 +87,6 @@ func init() { "local directory that files/dirs from target hosts will be copied to", ) - fetchCmd.Flags().StringVarP(&tmpDir, "tmp-dir", "t", "$HOME", - "directory of target hosts for storing temporary zip file", - ) - fetchCmd.Flags().BoolVarP( &enableZipFiles, "zip", @@ -98,4 +94,9 @@ func init() { false, "enable zip files ('zip' must be installed on target hosts)", ) + + fetchCmd.Flags().StringVarP(&tmpDir, "tmp-dir", "T", "$HOME", + `directory for storing temporary zip file on target hosts, +only useful if the -z flag is used`, + ) } diff --git a/internal/pkg/configflags/timeout.go b/internal/pkg/configflags/timeout.go index ea8ac2f..5c63e2f 100644 --- a/internal/pkg/configflags/timeout.go +++ b/internal/pkg/configflags/timeout.go @@ -48,12 +48,12 @@ func NewTimeout() *Timeout { // AddFlagsTo ... func (t *Timeout) AddFlagsTo(flags *pflag.FlagSet) { + flags.IntVarP(&t.Command, flagTimeoutCommand, "t", t.Command, + `timeout seconds for handling each target host`) flags.IntVarP(&t.Task, flagTimeoutTask, "", t.Task, "timeout seconds for the entire gossh task") flags.IntVarP(&t.Conn, flagTimeoutConn, "", t.Conn, "timeout seconds for connecting each target host") - flags.IntVarP(&t.Command, flagTimeoutCommand, "", t.Command, - `timeout seconds for handling each target host`) } // Complete ...