Shell Integration
Installing the Shell Integration
The first time you try to use a command that requires shell integration pkgx
will let you know:
Integration is minimal. We write one line to your .shellrc
that adds a few functions to your shell environment. If you like check it out first:
If you like what you see then you can see what integrate will do in a dry run:
And then finally integrate:
eval
ing the integration means you can immediately start using it, but if you prefer you can run pkgx integrate
by itself—it’s just the integration won’t start working until you start a new terminal session.
Once integrated every terminal session will have pkgx
integration. If for some reason you need a session without this integration you can unload:
To deintegrate pkgx
’s shellcode you can either:
Run
pkgx deintegrate
; orOpen your
~/.shellrc
file in an editor and remove our one-liner
Using the Shell Integration
env +pkg
creates temporary, isolated package environments for you to run commands in.
The (+pkg)
that prefixes your prompt indicates your terminal’s environment has been supplemented with the named pkgs.
Our shell integration intercepts calls to env
only if you are trying to control the package environment. Other uses are forwarded. Since our integration is shellcode it will only exist at your prompts, not any deeper like in shell scripts.
Package environments created with env +pkg
do not persist beyond the current terminal session. All the same if you need to remove pkgs from your current session use env -pkg
.
Creating Environments for Specific Versions
When you create environments the packages you request are installed if necessary.
Supplementing the Environment with Multiple Packages
Or:
Last updated