Skip to content

Commit

Permalink
Document AUTOENV_CUR_* variables
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperupcall committed Sep 30, 2024
1 parent c3699a4 commit 9f28b95
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ $ printf '%s\n' "source ~/.autoenv/activate.sh" >> ~/.bash_profile

## Configuration

_Before_ `source`ing `activate.sh`, you can set the following variables:
_Before_ `source`ing `activate.sh`, you can set the following _shell variables_:

- `AUTOENV_AUTH_FILE`: Files authorized to be sourced; defaults to `~/.autoenv_authorized` if it exists, otherwise, `~/.local/state/autoenv/authorized_list`
- `AUTOENV_NOTAUTH_FILE`: Files not authorized to be sourced; defaults to `~/.autoenv_not_authorized` if it exists, otherwise, `~/.local/state/autoenv/not_authorized_list` (`master` branch only)
Expand All @@ -148,6 +148,13 @@ _Before_ `source`ing `activate.sh`, you can set the following variables:
- `AUTOENV_VIEWER`: Program used to display env files prior to authorization; defaults to `cat` (`master` branch only)
- `AUTOENV_PRESERVE_CD`: Set this variable to a non-empty string to prevent the `cd` builtin from being overridden (to active autoenv, you must invoke `autoenv_init` within a `cd` function of your own) (`master` branch only)

### API

Inside the `.env` file, two _environment variables_ can be accessed:

- `AUTOENV_CUR_FILE` - The file being sourced.
- `AUTOENV_CUR_DIR` - Equivalent to `dirname "$AUTOENV_CUR_FILE"`.

## Shells

autoenv is tested on:
Expand Down

0 comments on commit 9f28b95

Please sign in to comment.