.sh

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

commit dc17b8bcee9a95c1f47ab835c01c61033a4960ba
parent 064c5e5caf898b548cb52546fbf3359a78489376
Author: Byron Torres <b@torresjrjr.com>
Date:   Fri, 26 Feb 2021 11:56:44 +0000

Rename .shrc to .rc.sh

Diffstat:
MREADME.md | 2+-
Mbash/.bashrc | 2+-
Msh/.profile | 2+-
Ash/.rc.sh | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dsh/.shrc | 64----------------------------------------------------------------
Mzsh/.zshrc | 2+-
6 files changed, 65 insertions(+), 68 deletions(-)

diff --git a/README.md b/README.md @@ -36,7 +36,7 @@ zsh sh /etc/profile: export DOTSHELL="$HOME/.sh" - /etc/profile: export ENV="$DOTSHELL/sh/.shrc" + /etc/profile: export ENV="$DOTSHELL/sh/.rc.sh" bash diff --git a/bash/.bashrc b/bash/.bashrc @@ -7,7 +7,7 @@ ## Common -source "$DOTSHELL/sh/.shrc" +source "$DOTSHELL/sh/.rc.sh" ## Settings diff --git a/sh/.profile b/sh/.profile @@ -8,7 +8,7 @@ # shell export DOTSHELL="$HOME/.sh" -export ENV="$DOTSHELL/sh/.shrc" # see sh(1) +export ENV="$DOTSHELL/sh/.rc.sh" # see sh(1) export INPUTRC="$DOTSHELL/misc/.inputrc" # system diff --git a/sh/.rc.sh b/sh/.rc.sh @@ -0,0 +1,61 @@ +# +# .rc.sh +# +# The common POSIX script for interactive shells + + +## Aliases + +# bulitins +alias c='clear' +alias rs='clear; . $DOTSHELL/sh/.rc.sh' # overwritten +alias ls='ls --color=auto --group-directories-first' +alias la='ls -FAX' +alias ll='ls -FAXlh' + +# externals +alias tree='tree -C --dirsfirst' +alias diff='diff --color=auto' +alias grep='grep --color=auto' + +alias gitl='git log --oneline --decorate --graph --all -5' +alias gitll='git log --oneline --decorate --graph --all' +alias gits='git status -s' +alias gitss='git status -v' +alias gitf=' + git status + gitl + echo ">>>" + git fetch -v + echo "<<<" + gitl + git status +' + + +# combinations +alias lf='la; tree -L 1' + + +## Functions + +runtime_print() { + pfetch + ls -FAX ; echo + test -d .git && { + git log -1 --oneline --decorate + git status -s + echo + } +} + + +## Local + +test -f "$DOTSHELL/local/.rc.sh" && + . "$DOTSHELL/local/.rc.sh" + + +## Runtime + +runtime_print diff --git a/sh/.shrc b/sh/.shrc @@ -1,64 +0,0 @@ -# -# .shrc -# -# The common POSIX script for interactive shells - - -## Aliases - -# bulitins -alias c='clear' -alias rs='clear; . $DOTSHELL/sh/.shrc' # overwritten -alias ls='ls --color=auto --group-directories-first' -alias la='ls -FAX' -alias ll='ls -FAXlh' - -# externals -alias tree='tree -C --dirsfirst' -alias diff='diff --color=auto' -alias grep='grep --color=auto' - -alias gitl='git log --oneline --decorate --graph --all -5' -alias gitll='git log --oneline --decorate --graph --all' -alias gits='git status -s' -alias gitss='git status -v' -alias gitf=' - git status - gitl - echo ">>>" - git fetch -v - echo "<<<" - gitl - git status -' - - -# combinations -alias lf='la; tree -L 1' - - -## Functions - -runtime_print() { - pfetch - ls -FAX ; echo - test -d .git && { - git log -1 --oneline --decorate - git status -s - echo - } -} - - -## Local - -test -f "$DOTSHELL/local/.shrc" && - . "$DOTSHELL/local/.shrc" - - -## Runtime - -runtime_print - - -# ex: set ft=sh: diff --git a/zsh/.zshrc b/zsh/.zshrc @@ -6,7 +6,7 @@ ## Common -source "$DOTSHELL/sh/.shrc" +source "$DOTSHELL/sh/.rc.sh" ## Settings