.sh

Multi-shell dotfiles manager
Log | Files | Refs | README | LICENSE

commit 49d325ae85bad847c6beb97d2a60fefa8e682733
parent 9087c2c2c866420f629f633094acc181e33f7fc8
Author: Byron Torres <b@torresjrjr.com>
Date:   Sun,  7 Mar 2021 02:56:55 +0000

Update README.md, dotshell

Diffstat:
MREADME.md | 60+++++++++++++++++++++++++-----------------------------------
Mbin/dotshell | 4++--
2 files changed, 27 insertions(+), 37 deletions(-)

diff --git a/README.md b/README.md @@ -1,51 +1,41 @@ dotshell ======== -Sensible config and management system for multiple shell dotfiles. -Has redundancy for unprivileged users (can't modify `/etc/profile`). +Syncs the dotfiles of multiple shells from one repository to $HOME. +Provides multi-machine and user-local configuration. -Usage ------ - -The $DOTSHELL variable is set to `~/.sh`. -Shell dotfiles in the home directory (~) can be removed (rm) safetly. -Use `.sh/bin/sync` to retrieve again. - -For all shell profiles to take effect, logout and login again. -For all shell rcfiles to take effect, source ".sh/<SHELL>/.<SHELL>rc". - - -### Unprivileged user - -sh +Install +------- - $ ~/.sh/bin/sync sh # links `~/.profile` + $ cd $HOME + $ git clone https://git.sr.ht/~torresjrjr/.sh -bash - $ ~/.sh/bin/sync bash # links `~/.profile` & `~/.bashrc` - -zsh - - $ ~/.sh/bin/sync zsh # links `~/zshenv` - - -### Privileged user +Usage +----- -sh +dotshell provides the `dotshell` command, which syncs shell dotfiles +stored in `$DOTSHELL` to `$HOME` with symbolic links. - /etc/profile: export DOTSHELL="$HOME/.sh" - /etc/profile: export ENV="$DOTSHELL/sh/.rc.sh" +The `$DOTSHELL` variable is set to `$HOME/.sh` by default. +The `dotshell` command is located at `$DOTSHELL/bin/dotshell`. +Run `dotshell {shell}...` to sync the dotfiles of `{shell}...`. -bash + $ dotshell sh # syncs `~/.profile` + $ dotshell bash # syncs `~/.profile` & `~/.bashrc` + $ dotshell zsh # syncs `~/zshenv` - /etc/profile: export DOTSHELL="$HOME/.sh" +Shell dotfiles in the home directory can be removed safetly. +For all shell profiles to take effect, logout and login again. +For all shell rc-files to take effect, source the files. - $ ~/.sh/bin/sync bash # links `~/.profile` & `~/.bashrc` +Local-specific configuration can be achieved by writing dotfiles in +`$DOTSHELL/local/` with their respective filenames. -zsh - /etc/zshenv: export DOTSHELL="$HOME/.sh" - /etc/zshenv: export ENV="$ZDOTDIR/zsh" +Contribute +---------- +Send patches and questions to <~torresjrjr/public-inbox@lists.sr.ht> +(see [git-send-email.io](https://git-send-email.io/)). diff --git a/bin/dotshell b/bin/dotshell @@ -3,9 +3,9 @@ # Creates symbolic links from $HOME to .profile and .zshenv usage() { - printf 'usage: dotshell <shell>... + printf 'usage: dotshell {shell}... -Synchronises the necessary dotfiles of <shell> in $DOTSHELL at $HOME. +Synchronises the necessary dotfiles of {shell} in $DOTSHELL to $HOME. ' }