Skip to content

Commit

Permalink
correct note in light of discovered pebcac
Browse files Browse the repository at this point in the history
  • Loading branch information
vilmibm committed Jun 4, 2020
1 parent 4426728 commit dc76fe0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions command/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ var aliasCmd = &cobra.Command{

var aliasSetCmd = &cobra.Command{
Use: "set <alias> <expansion>",
// NB: Even when inside of a single-quoted string, cobra was noticing and parsing any flags
// used in an alias expansion string argument. Since this command needs no flags, I disabled their
// parsing. If we ever want to add flags to alias set we'll have to figure this out. I tested on
// linux in various shells against cobra 1.0; others on macos did /not/ see the same behavior.
// NB: this allows a user to eschew quotes when specifiying an alias expansion. We'll have to
// revisit it if we ever want to add flags to alias set but we have no current plans for that.
DisableFlagParsing: true,
Short: "Create a shortcut for a gh command",
Long: `This command lets you write your own shortcuts for running gh. They can be simple strings or accept placeholder arguments.`,
Expand Down

0 comments on commit dc76fe0

Please sign in to comment.