gh-select

Environment variables

Every variable gh-select reads, with defaults and the flag it matches.

View as Markdown

None are required. Flags win over variables.

gh-select

VariableDefaultEffect
GH_SELECT_CLONE_DIRcurrent directorysame as --dir
GH_SELECT_DOWNLOAD_DIRcurrent directorysame as --download-dir
GH_SELECT_THEMEsaved theme, then gruvboxsame as --theme
GH_SELECT_BORDERnonesame as --border
GH_SELECT_ICONSnerdsame as --icons
GH_SELECT_TRANSPARENTunsetany non-empty value is the same as --transparent
GH_SELECT_SCAN_DIRSunsetdirectories searched first for existing clones, separated like PATH
GH_SELECT_CACHE_TTL1800seconds before the repo cache is stale. 0 makes it always stale. A non-number or negative value falls back to 1800
GH_SELECT_NO_UPDATE_CHECKunsetany non-empty value skips the daily check for a newer release

GH_SELECT_CLONE_DIR, GH_SELECT_DOWNLOAD_DIR and every entry of GH_SELECT_SCAN_DIRS expand a leading ~.

Others it reads

VariableEffect
NO_COLORany non-empty value turns off color in help and error output
CIany non-empty value turns off the update check
VISUAL, EDITORthe editor for Open in editor, VISUAL first. Flags are allowed, as in code -w
XDG_CONFIG_HOMEbase for the config directory, ~/.config when unset
XDG_CACHE_HOMEbase for the cache directory, ~/.cache when unset

The GitHub token is not a variable. It comes from gh auth login. See how it works.

Examples

sh~/.bashrc or ~/.zshrc
export GH_SELECT_CLONE_DIR=~/dev
export GH_SELECT_SCAN_DIRS=~/work:~/oss
export GH_SELECT_THEME=tokyonight
export GH_SELECT_CACHE_TTL=3600
sh~/.config/fish/config.fish
set -gx GH_SELECT_CLONE_DIR ~/dev
set -gx GH_SELECT_SCAN_DIRS ~/work:~/oss
Edit this page on GitHub

Last updated on

On this page