Skip to content

Commit

Permalink
Merge pull request #22 from amaya382/doc/example
Browse files Browse the repository at this point in the history
Update docs
  • Loading branch information
amaya382 authored Oct 12, 2020
2 parents 2e9039d + 6dd88ff commit 28599bb
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 8 deletions.
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,42 +20,52 @@ Just use `*rc` commands instead of original commands
**Note**: Incompatible subcommands (e.g., `ps` for `dockerrc`) will be passed to the original command (i.e., `docker ps` will be executed).


### Setup
### Setup/Upgrade
```sh
# If you want to install the latest version, change version to master in the url and set VERSION
# VERSION: anyrc version (default: same as install script version)
# DIR: Where to install (default: /usr/local/bin)
# FORCE: If defined, override .anyrc (default: undefined)
curl -sS https://raw.githubusercontent.com/amaya382/anyrc/0.1.0/install.sh | DIR=/usr/local/bin bash
## default installation example
curl -sS https://raw.githubusercontent.com/amaya382/anyrc/0.1.0/install.sh | bash
## fully-customized installation example
curl -sS https://raw.githubusercontent.com/amaya382/anyrc/master/install.sh | VERSION=master DIR=~/.local/bin FORCE=1 bash

# Put your dotfiles or create symlinks of them into $HOME/.anyrc.d
ln -s /path/to/your/dotfiles/.dotfile $HOME/.anyrc.d/.dotfile
ln -s /path/to/your/dotfiles/.somedotfile $HOME/.anyrc.d/.somedotfile
```

See [example](./example) as well.

### Options

### More options
* `ANYRC_DANYRC`: Path to `.anyrc`. Default is in home dir or curr dir
* `ANYRC_DANYRCD`: Path to `.anyrc.d`. Default is in home dir or curr dir
* `ANYRC_SSH_CMD`: `ssh` command, i.e., you can use `autossh` instead
* `ANYRC_DOCKER_WO_TAR`: If set, will work w/o `tar` on `dockerrc`
* `ANYRC_K8S_WO_TAR`: If set, will work w/o `tar` on `kubectlrc`
* `ANYRC_WO_TAR`: If set, will work w/o `tar` on any remote environment

```sh
# sshrc will use autossh internally
ANYRC_SSH_CMD=autossh sshrc user@host
```


## Customize
### Config files
* `.anyrc`: Pre-configured for zsh, bash, tmux, and vim. If you want to support other tools, edit me.
* `.anyrc`: Pre-configured for zsh, bash, tmux, git, and vim. If you want to support other tools, edit me.
* `.anyrc.d/*`: Dotfiles you want to bring into remote. Symlinks are allowed.

### Environment variables (in `.anyrc` and `.anyrc.d/*`)
### Available environment variables (in `.anyrc` and `.anyrc.d/*`)
* `ANYRC_ENV`: Show remote environment (`ssh`/`su`/`docker`/`k8s`)
* `ANYRC_ROOT`: Path to tmp dir including all anyrc-related files each connection
* `ANYRC_HOME`: Path to dir for dotfiles
* `ANYRC_DANYRC`: Path to `.anyrc`
* `ANYRC_DANYRCD`: Path to `.anyrc.d`

### Examples
See [example](https://github.com/amaya382/anyrc/tree/master/example)
See [example](./example)

### Completion
#### zsh
Expand Down Expand Up @@ -84,7 +94,7 @@ compdef kubectlrc=kubectl
* tmux
* vim
* git
* etc.
* etc. (can support other tools by editing `.anyrc`)


## :bow: Acknowledgement
Expand Down
9 changes: 9 additions & 0 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# anyrc example
## Files you need
* `.anyrc`
* Nomally, you needn't care of this file
* This file will be installed automatically in the anyrc installation
* Pre-configured for zsh, bash, tmux, git, and vim
* If you want to support other tools, edit me
* `.anyrc.d/*`
* Put your dotfiles here. Symlinks are allowed.

0 comments on commit 28599bb

Please sign in to comment.