-
Notifications
You must be signed in to change notification settings - Fork 8k
Description
Describe the feature or problem you’d like to solve
Using gh version 1.9.2, I cannot reliably set aliases for complex commands with mixed quotations. Different shells have different rules on quotes, variable replacement characters e.g. $, and they can destroy the correct command line whether using multiline string literals, read in linux, or many other methods I've tried across PowerShell and bash.
Proposed solution
Like some other commands that might accept more complex input with mixed quotes or variable replacement characters, accept piped input instead, e.g.:
cat example.txt | gh alias set example -The dash - would denote that stdin should be read for content instead and no escaping should be done on input. While - is fairly common, a switch would be sufficient as well.
Additional context
After many various attempts, I ended up just editing ~/.config/gh/config.yml directly, but for repeatability - like sharing useful aliases people can simply copy and paste into their terminal - it would be great to provide a command line-driven alternative like this.