summaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorChristian Rocha <christian@rocha.is>2020-05-25 11:45:56 -0400
committerChristian Muehlhaeuser <muesli@gmail.com>2020-10-05 13:44:20 +0200
commit05a56388a9743af5e80cf5618b5db51ac43de764 (patch)
tree98ad2b78307e4b7dba55a26c19a5992260e97d3c /main.go
parent28f8f185d7cb047d4434e592d8be909170501dfd (diff)
Comments
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.go b/main.go
index b02c471..363c984 100644
--- a/main.go
+++ b/main.go
@@ -164,7 +164,7 @@ func execute(cmd *cobra.Command, args []string) error {
func executeArg(cmd *cobra.Command, arg string, w io.Writer) error {
- // TODO: Put this somewhere where it makes more sense
+ // Only run TUI if there are no arguments (excluding flags)
if arg == "" {
// Log to a file. For debugging.
@@ -274,14 +274,16 @@ func init() {
}
rootCmd.Version = Version
+ // "Glow Classic" cli arguments
rootCmd.Flags().BoolVarP(&pager, "pager", "p", false, "display with pager")
rootCmd.Flags().StringVarP(&style, "style", "s", "auto", "style name or JSON path")
rootCmd.Flags().UintVarP(&width, "width", "w", 0, "word-wrap at width")
+ // For network-related operations, namely stashing and the TUI
rootCmd.PersistentFlags().StringVarP(&identityFile, "identity", "i", "", "path to identity file (that is, an ssh private key)")
rootCmd.PersistentFlags().BoolVarP(&forceKey, "force-key", "f", false, "for the use of the SSH key on disk (that is, ignore ssh-agent)")
+ // Stash
stashCmd.PersistentFlags().StringVarP(&memo, "memo", "m", "", "memo/note for stashing")
-
rootCmd.AddCommand(stashCmd, stashListCmd, stashGetCmd, stashDeleteCmd)
}