mirror of
https://github.com/charmbracelet/glow
synced 2024-12-14 14:12:27 +00:00
Disable identity & force-key flags
This commit is contained in:
parent
be478cbaf3
commit
2821cf2fb4
2 changed files with 23 additions and 14 deletions
8
main.go
8
main.go
|
@ -176,7 +176,7 @@ func executeArg(cmd *cobra.Command, arg string, w io.Writer) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Config from flags
|
// Config from flags
|
||||||
cfg.IdentityFile = identityFile
|
// cfg.IdentityFile = identityFile
|
||||||
|
|
||||||
// Log to file, if set
|
// Log to file, if set
|
||||||
if cfg.Logfile != "" {
|
if cfg.Logfile != "" {
|
||||||
|
@ -294,8 +294,10 @@ func init() {
|
||||||
rootCmd.Flags().UintVarP(&width, "width", "w", 0, "word-wrap at width")
|
rootCmd.Flags().UintVarP(&width, "width", "w", 0, "word-wrap at width")
|
||||||
|
|
||||||
// For network-related operations, namely stashing and the TUI
|
// 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, "force the use of the SSH key on disk (that is, ignore ssh-agent)")
|
rootCmd.PersistentFlags().StringVarP(&identityFile, "identity", "i", "", "path to identity file (that is, an ssh private key)")
|
||||||
|
rootCmd.PersistentFlags().BoolVarP(&forceKey, "force-key", "f", false, "force the use of the SSH key on disk (that is, ignore ssh-agent)")
|
||||||
|
*/
|
||||||
|
|
||||||
// Stash
|
// Stash
|
||||||
stashCmd.PersistentFlags().StringVarP(&memo, "memo", "m", "", "memo/note for stashing")
|
stashCmd.PersistentFlags().StringVarP(&memo, "memo", "m", "", "memo/note for stashing")
|
||||||
|
|
29
stash.go
29
stash.go
|
@ -13,10 +13,13 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
identityFile string
|
/*
|
||||||
forceKey bool
|
identityFile string
|
||||||
memo string
|
forceKey bool
|
||||||
stashCmd = &cobra.Command{
|
*/
|
||||||
|
|
||||||
|
memo string
|
||||||
|
stashCmd = &cobra.Command{
|
||||||
Use: "stash SOURCE",
|
Use: "stash SOURCE",
|
||||||
Hidden: false,
|
Hidden: false,
|
||||||
Short: "stash a markdown",
|
Short: "stash a markdown",
|
||||||
|
@ -49,13 +52,17 @@ func getCharmConfig() *charm.Config {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
if identityFile != "" {
|
|
||||||
cfg.SSHKeyPath = identityFile
|
/*
|
||||||
cfg.ForceKey = true
|
if identityFile != "" {
|
||||||
}
|
cfg.SSHKeyPath = identityFile
|
||||||
if forceKey {
|
cfg.ForceKey = true
|
||||||
cfg.ForceKey = true
|
}
|
||||||
}
|
if forceKey {
|
||||||
|
cfg.ForceKey = true
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
return cfg
|
return cfg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue