flk hook
Prints shell code that defines the refresh and switch functions. Add it to your rc file:
eval "$(flk hook bash)" # ~/.bashrc
eval "$(flk hook zsh)" # ~/.zshrc
flk hook fish | source # ~/.config/fish/config.fish
To keep the rc file working on machines without flk:
if command -v flk >/dev/null; then eval "$(flk hook bash)"; fi
Supported shells: bash, zsh, fish. What the two functions do is described in switch / refresh.