feat: allow style set via environment variable#43
Merged
reugn merged 1 commit intoreugn:mainfrom Feb 27, 2025
Merged
Conversation
Contributor
Author
|
Note, the two places using the environment variable have identical code, but they have other parts of them that can be refactored: both |
reugn
reviewed
Feb 26, 2025
smemsh
added a commit
to smemsh/gemini-cli
that referenced
this pull request
Feb 27, 2025
This is the standard environment variable used with other Glamour apps (such as Github CLI). This way the user does not have to add extra arguments (--style=) to all their comand line invocations to use a style file, and the value of the variable will get passed to the Glamour backend for interpretation. Furthermore, it allows sharing settings with other Glamour-using applications, by using an environment variable.
smemsh
added a commit
to smemsh/gemini-cli
that referenced
this pull request
Feb 27, 2025
This is the standard environment variable used with other Glamour apps (such as Github CLI). This way the user does not have to add extra arguments (--style=) to all their comand line invocations to use a style file, and the value of the variable will get passed to the Glamour backend for interpretation. Furthermore, it allows sharing settings with other Glamour-using applications, by using an environment variable.
smemsh
added a commit
to smemsh/gemini-cli
that referenced
this pull request
Feb 27, 2025
This is the standard environment variable used with other Glamour apps (such as Github CLI). This way the user does not have to add extra arguments (--style=) to all their comand line invocations to use a style file, and the value of the variable will get passed to the Glamour backend for interpretation. Furthermore, it allows sharing settings with other Glamour-using applications, by using an environment variable.
464d56e to
a44daf4
Compare
This is the standard environment variable used with other Glamour apps (such as Github CLI). This way the user does not have to add extra arguments (--style=) to all their comand line invocations to use a style file, and the value of the variable will get passed to the Glamour backend for interpretation. Furthermore, it allows sharing settings with other Glamour-using applications, by using an environment variable.
a44daf4 to
740e0a1
Compare
reugn
approved these changes
Feb 27, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow the Glamour style to be set by using its standard environment variable,
$GLAMOUR_STYLE. This allows all Glamour-using apps (such as GitHub CLI app) to share a style specification by setting a variable in the user's shell profile. Furthermore, it allowsgemini-clito use a style without needing to repeatedly specify--style=on the command line.The argument can be a predefined style name or the path to a json style file, as interpreted by Glamour's
WithEnvironmentConfig().Fixes #42