From 33afbbc4e9e82a0454453ad030a08db03f9080a4 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sat, 20 Jun 2015 21:53:06 -0700 Subject: [PATCH] Update sync session docs --- cmd-session.go | 13 ++++++++++--- cmd-sync.go | 1 + 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/cmd-session.go b/cmd-session.go index ce8ca4fb..d3916198 100644 --- a/cmd-session.go +++ b/cmd-session.go @@ -46,7 +46,14 @@ FLAGS: {{end}}{{ end }} EXAMPLES: - -- TODO -- + 1. List sessions + $ mc {{.Name}} session list + + 2. Resume session + $ mc {{.Name}} session resume [SESSION] + + 3. Clear session + $ mc {{.Name}} session clear [SESSION]|[*] `, } @@ -114,7 +121,7 @@ func clearSession(sid string) error { return nil } -func sessionExecture(bar barSend, s *sessionV1) { +func sessionExecute(bar barSend, s *sessionV1) { switch s.CommandType { case "cp": for cps := range doCopyCmdSession(bar, s) { @@ -183,7 +190,7 @@ func runSessionCmd(ctx *cli.Context) { if !globalQuietFlag { bar = newCpBar() } - sessionExecture(bar, s) + sessionExecute(bar, s) if !globalQuietFlag { bar.Finish() if err := clearSession(sid); err != nil { diff --git a/cmd-sync.go b/cmd-sync.go index 23698022..d51aabdf 100644 --- a/cmd-sync.go +++ b/cmd-sync.go @@ -258,6 +258,7 @@ func runSyncCmd(ctx *cli.Context) { if err := saveSession(s); err != nil { console.Fatalln(iodine.ToError(err)) } + console.Infoln("\nSession terminated. To resume session type ‘mc session resume " + s.SessionID + "’") // this os.Exit is needed really to exit in-case of "os.Interrupt" os.Exit(0) }