shared functions and commands for bash/zsh