- Add shell completions #6
- These will be automatically loaded as part of the existing shell integrations, so if you already have
es init | source
or similar in your shell init file, you don't need to change anything
- These will be automatically loaded as part of the existing shell integrations, so if you already have
- Add command aliases
es r
alias fores run
,es s
fores set
- Upgrade Rust version to 1.80.0
- Do not load config for subcommands that don't need it (e.g.
es init
)- This fixes error output showing for invalid configs when it's not relevant
- Escape single quotes in variable names/values (#65)
- Preserve quotes in command arguments passed to
es run
(#72)
- Fix some typos in docs and warning messages (oops)
es set
subcommand no longer requires--source-file
arg- The intention is to make the command useful even without the wrapping function (and to provide helpful hint output)
- Rename binary from
env-select
toes
- I'm not considering this a breaking change, because running the binary directly was not considered a supported use case.
- Pass a list of strings to
multiple
to filter which values are loaded from a mapping
- Resolve values in parallel
- This means profile resolution will only take as long as the slowest step, rather than the sum of all steps
- Use
es
instead ofenv-select
in CLI help output es show config
now accepts optional arguments to print for a single application or profile
- Update to Rust 1.72 and update dependencies
- Fix log output coloring
- [BREAKING] Removed Kubernetes value source
- Remove the concept of native commands
- The
command
value source is effectively gone, and theshell
value source type has to renamed tocommand
to replace the old one- In other words, the
shell
type is gone and thecommand
field for thecommand
type now takes a string instead of astring[]
- In other words, the
- Side effects can now only be shell commands (string literals)
- This is to reduce the overall complexity of the tool. I don't thi nk there's a strong use case for native commands, where you can't just use shell commands
- The
- Add
cwd
option tocommand
value source type, to force the command to execute in a particular directory - Modifications to the
PATH
variable will be prepended to the existing value, rather than replacing it- This special behavior is based on the variable name, and only applies to
PATH
- This special behavior is based on the variable name, and only applies to
- Cascading config files are now only merged down to the profile level
- Added side effects. See usage docs for more. Imperative environment configuration!
- Sourceable output from
es set
is now written to a temporary file instead of stdout. This difference is handled by the shell functions, so no change to behavior for users
es show
is now broken into sub-subcommands:es show config
andes show shell
- Unknown keys in config will now be rejected
- Add
--run-in-shell
flag toes run
es run
andes set
no longer require an application name in the command; if not given, they will prompt, the same way they prompt for profile name
- Provide more context if the subprocess in
es run
fails
- Load multiple values from a single source with the
multiple
flag- Supported for all value source types
file
value source, which loads value(s) from a file path (combine withmultiple = true
for maximum fun!)- Support non-string primitives for simple literal values
- E.g.
VARIABLE1 = 123
orVARIABLE2 = false
- These values will simply be stringified before export, since shells only understand strings anyway
- E.g.
- Improve test coverage!
This should be the last release with major breaking changes. The config layout has changed dramatically in order to support planned (and unplanned) future features.
- Removed
vars
config section. You can no longer provide mappings for single variables. Instead, define a set of profiles with single variables- This feature didn't provide any additional functionality, it was just a slight convenience at the cost of complexity both for users and code
- Restructured profile config:
- Renamed
apps
field toapplications
- Add new
profiles
andvariables
subfields - Overall, this means
apps.app1.profile1.VARIABLE1
will now beapplications.app1.profiles.profile1.variables.VARIABLE1
- This is more tedious, but allows for current and future features to fit into the config
- Renamed
- Profile inheritance - profiles can now extend other profiles, eliminating the need to copy-paste a bunch of common content between profiles
es
shell function definitions now use the full path to theenv-select
binary rather than relying onPATH
- This eliminates the need to add
env-select
to thePATH
, and also guarantees that the copy ofenv-select
that is being executed byes
is the one that generated thates
definition in the first place
- This eliminates the need to add
- Fix binaries being built for the wrong architecture
- Defer shell path loading until it's needed. This will enable env-select init on systems that don't have the specified shell present
I tried to fit all the foreseeable breaking changes into this release, there may be some more though.
- Complex value sources (i.e. anything other than a simple string) now require the
type
field. E.g.type = "literal"
ortype = "command"
- As value sources get more intricate, options start to collide. This field makes it easy to disambiguate between source types, which allows them to have overlapping option names
- Rename
--shell-path
option back to--shell
, and it once again only requires a shell name, rather than a full path- The full path for the shell will be grabbed via the
which
command now. This means whatever shell you use must be in yourPATH
- The full path for the shell will be grabbed via the
- Rename
command
value source type toshell
- The old
command
name is now used for commands that are executed natively
- The old
- Add
run
subcommand, for one-off environment usage- This runs a single command in the configured environment, rather than modifying the shell environment. Similar to
kubectl exec
orpoetry run
- This runs a single command in the configured environment, rather than modifying the shell environment. Similar to
- Add
command
value source type, which accepts an array of strings and executes a command natively, rather than via the shell - Add
kubernetes
value source type, which executes a command in a kubernetes pod viakubectl
- Support complex literal values, enabling the
sensitive
option for literals- This option probably isn't that useful, but now the field is supported globally
- Add a third level of verbosity (
-vvv
) to enable more granularity in log filtering
- Fix macOS x86 build in CI (the binary will appear on releases now)
- Add a bunch of tests
- Shell configuration can now be loaded from
env-select init
function. Add this to your shell startup script to load it automatically. See installation instructions for more info. --shell-path
option allows you to override the$SHELL
variable. This is rarely necessary, mostly useful for debugging.- Print configured variables to stderr to give some feedback when running
es set
- Add
sensitive
option tocommand
value source, to mask data in information output - Support additional verbosity level with
-vv
- Dynamic commands are now executed within the scope of env-select . Env-select will run your shell as a subprocess to execute the command, rather than print out a templated string (e.g.
$(echo def)
) to invoke a subshell. This reduces the surface area for bugs, and opens up options new kinds of dynamic values.
Fixed release process. Binaries for 0.4.0 are attached to this release
- Renamed binary from
es
toenv-select
(to facilitate shell plugins usinges
) - Moved main functionality under
env-select set
subcommand
- Added fish plugin
- Added
show
subcommand
- Emit non-zero exit code for errors
- Print available variables and applications for bare
env-select set
or an invalid variable/application name
- Add
command
variant for values, allowing lazily evaluated commands instead of static values
- Add
aarch64-apple-darwin
to release build - Upgrade to rust 1.67.1
- Reorient schema around named profiles (breaking change)
- Fix terminal cursor disappearing after ctrl-c (#5)
- Allow passing profile name (or literal value, for single variables) as a cmd arg to skip interactive prompt (#3)
- Give profiles/variables consistent ordering in prompt (#2)
- Clean up error handling a bit
- Lots of doc improvements