-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #159 from Zyko0/cli_fix_#158
Fixed completion on restart command #158
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package autocomplete | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/Scalingo/cli/Godeps/_workspace/src/github.com/Scalingo/codegangsta-cli" | ||
"github.com/Scalingo/cli/Godeps/_workspace/src/github.com/Scalingo/go-scalingo" | ||
"github.com/Scalingo/cli/Godeps/_workspace/src/gopkg.in/errgo.v1" | ||
) | ||
|
||
func RestartAutoComplete(c *cli.Context) error { | ||
appName := CurrentAppCompletion(c) | ||
if appName == "" { | ||
return nil | ||
} | ||
|
||
processes, err := scalingo.AppsPs(appName) | ||
if err != nil { | ||
return errgo.Mask(err) | ||
} | ||
for _, ct := range processes { | ||
fmt.Println(ct.Name) | ||
} | ||
|
||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters