kraven-0.2.2 is not a library.
kraven
Manage named environment variable profiles.
Installation
Usage
# List available profiles
# Create or edit a profile
# Activate a profile (spawns a subshell with env vars)
# Show the currently active profile
# Display profile contents
# Display profile contents with masked values
# Show how to exit the current kraven session
# Remove a profile
# Show shell completion setup instructions
Shell Completions
Enable tab completion by adding the appropriate line to your shell config:
# Bash (~/.bashrc)
# Zsh (~/.zshrc)
# Fish (~/.config/fish/config.fish)
COMPLETE=fish |
Then restart your shell or source the config file.
Customizing Your Shell Prompt
When a profile is active, Kraven sets the KRAVEN_ACTIVE environment variable to the profile name. You can use this to display the active profile in your shell prompt.
Zsh
Add this to your ~/.zshrc:
PROMPT='${kraven_info}%~ %# '
Bash
Add this to your ~/.bashrc:
PROMPT_COMMAND=set_prompt
Fish
Add this to your ~/.config/fish/config.fish or create ~/.config/fish/functions/fish_prompt.fish:
function fish_prompt
if set -q KRAVEN_ACTIVE
echo -n "[$KRAVEN_ACTIVE] "
end
echo -n (prompt_pwd) '> '
end
Profile Format
Profiles are stored as plain text files in ~/.config/kraven/ using the standard dotenv format:
KEY=value
ANOTHER_KEY=another_value
# Comments start with #
QUOTED="value with spaces"
SINGLE_QUOTED='literal $value without expansion'
# Double-quoted values support escape sequences
ESCAPED="line1\nline2\ttabbed"
Supported escape sequences in double-quoted values: \", \\, \n, \t
License
GPL-3.0