Skip to content

Commit

Permalink
Add env-minimize.
Browse files Browse the repository at this point in the history
  • Loading branch information
danfuzz committed Nov 6, 2023
1 parent 19afc89 commit 5b8333e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Breaking changes:
* None.

Other notable changes:
* `bashy-basics`: New utility functions `env-clean` and `env-names`.
* `bashy-basics`: New utility functions `env-clean`, `env-minimize`, and
`env-names`.

### v2.7 -- 2023-10-30

Expand Down
6 changes: 6 additions & 0 deletions scripts/lib/bashy-basics/_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ function env-clean {
done
}

# Runs `env-clean` passing it a reasonably "minimal" set of environment
# variables to keep.
function env-minimize {
env-clean HOME HOSTNAME LANG LOGNAME PATH PWD SHELL SHLVL TERM TMPDIR USER
}

# Prints a list of the names of all defined environment variables.
function env-names {
# It turns out that the most straightforward way to get a list of
Expand Down

0 comments on commit 5b8333e

Please sign in to comment.