Bring your .bashrc
, .zshrc
, .vimrc
, etc. into any remote environments, such as ssh, docker container (docker exec
/kubectl exec
), and other user (su
).
Just use *rc
commands instead of original commands
sshrc xxx
instead ofssh xxx
- e.g.,
sshrc -p 10022 [email protected]
- e.g.,
surc xxx
instead ofsu xxx
- e.g.,
surc foo
- e.g.,
dockrc xxx
instead ofdocker exec xxx
- e.g.,
dockrc foo_container bash
- e.g.,
kuberc xxx
instead ofkubectl exec xxx
- e.g.,
kuberc foo_pod zsh
- e.g.,
# Will be installed into /usr/local/bin
# DIR: Where to install
# FORCE: Override .anyrc or not
curl -sSL https://github.com/amaya382/anyrc/raw/master/install.sh | DIR=/usr/local/bin bash
# Put your dotfiles or create symlinks of them into $HOME/.anyrc.d
ln -s /path/to/your/dotfiles/.dotfile $HOME/.anyrc.d/.dotfile
ANYRC_DANYRC
: Path to.anyrc
. Default is in home dir or curr dirANYRC_DANYRCD
: Path to.anyrc.d
. Default is in home dir or curr dirANYRC_DOCKER_WO_TAR
: If set, will work w/otar
on dockrcANYRC_K8S_WO_TAR
: If set, will work w/otar
on kubercANYRC_WO_TAR
: If set, will work w/otar
on any remote environment
.anyrc
: Pre-configured for zsh, bash, tmux, and vim. If you want to support another tool, edit me..anyrc.d/*
: Dotfiles you want to bring into remote. Symlinks are allowed.
ANYRC_ENV
: Show remote environment (ssh
/su
/docker
/k8s
)ANYRC_ROOT
: Path to tmp dir including all anyrc-related files each connectionANYRC_HOME
: Path to dir for dotfilesANYRC_DANYRC
: Path to.anyrc
ANYRC_DANYRCD
: Path to.anyrc.d
See example
ssh
- Attach w/ a login shell
docker exec
- Attach w/ a specified shell
kubectl exec
- Attach w/ a specified shell
su
(work w/sudo
)- Attach w/ a login shell
- zsh
- bash
- tmux
- vim
- etc.
- Russell91/sshrc
- Using a lot of logics and codes from sshrc