glab cli environment variable deprecation (GLAB_ prefix) feedback issue
Summary
This issue is used to track the progress of deprecating current environment variables that are used by the glab cli.
Starting with glab version v2.0.0 environment variables used by glab
should be prefixed with GLAB_
, namely:
GLAMOUR_STYLE
DEBUG
NO_PROMPT
FORCE_HYPERLINKS
The following environment variables that will continue working as before are:
-
BROWSER
- the process spawned by the command to start the browser inherits the environment variables, so it doesn't make sense to haveGLAB_BROWSER
to rename it toBROWSER
-
NO_COLOR
- the tool follows the https://no-color.org/ specification -
VISUAL
- considered one of the default values nowadays -
EDITOR
- considered one of the default values nowadays
Until then both versions of the environment variables will work. To give an example:
❯ GLAB_NO_PROMPT=true ./bin/glab mr create
ERROR: --title or --fill required for non-interactive mode.
Try 'glab mr create --help' for more information.
❯ NO_PROMPT=true ./bin/glab mr create
DEPRECATION WARNING: The environment variable NO_PROMPT has been deprecated and will be removed in future releases. Use GLAB_NO_PROMPT instead.
ERROR: --title or --fill required for non-interactive mode.
Try 'glab mr create --help' for more information.
To give another couple of examples:
❯ GLAMOUR_STYLE=light ./bin/glab issue view 7928 | head -3
DEPRECATION WARNING: The environment variable GLAMOUR_STYLE has been deprecated and will be removed in future releases. Use GLAB_GLAMOUR_STYLE instead.
title: glab release fails with 422 when using --publish-to-catalog
state: open
❯ GLAB_GLAMOUR_STYLE=light ./bin/glab issue view 7928 | head -3
title: glab release fails with 422 when using --publish-to-catalog
state: open
author: ignacio.piqueras
Below is the list of environment variables and their new names:
before | after |
---|---|
GLAMOUR_STYLE |
GLAB_GLAMOUR_STYLE |
DEBUG |
GLAB_DEBUG |
NO_PROMPT |
GLAB_NO_PROMPT |
FORCE_HYPERLINKS |
GLAB_FORCE_HYPERLINKS |
Edited by Filip Aleksic