.sh

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

commit 73b3af39aa56128f24f2d866923c3adc61632848
parent 49701c5c71424ab2bd40438155a5a59ab9327199
Author: Byron Torres <b@torresjrjr.com>
Date:   Sun, 23 May 2021 16:47:35 +0100

New gitf, lf, la, gitl functions and aliases

gitf() now prints more concisely, primarily by the use of the new gitl.

'gitl' now prints only the latest commits upto the last common commit.

lf() now prints a series columned ls' for each directory in the cwd.

'la' now explicitly uses the -C flag "list entries by columns".

Diffstat:
Msh/.rc.sh | 36+++++++++++++++++++++++++-----------
1 file changed, 25 insertions(+), 11 deletions(-)

diff --git a/sh/.rc.sh b/sh/.rc.sh @@ -20,7 +20,7 @@ set -o vi alias c='clear' alias rs='clear; . $DOTSHELL/sh/.rc.sh' # overwritten alias ls='ls -w 80 --color=auto --group-directories-first' -alias la='ls -FAX' +alias la='ls -FAXC' alias ll='ls -FAXlh' # externals @@ -28,18 +28,10 @@ alias tree='tree -C --dirsfirst' alias diff='diff --color=auto' alias grep='grep --color=auto' -alias gitl='git log --oneline --decorate --graph --all -10' -alias gitll='git log --oneline --decorate --graph --all' alias gits='git status -s' alias gitss='git status -v' -alias gitf=' - git status ; echo "---" ; gitl ; - echo ">>>" ; git fetch ; echo "<<<" ; - gitl ; echo "---" ; git status ; -' - -# combinations -alias lf='la; tree -L 1' +alias gitll='git log --oneline --decorate --graph --all' +alias gitl='gitll HEAD origin/HEAD $(git merge-base HEAD origin/HEAD)^!' ## Functions @@ -55,6 +47,28 @@ info() { } } +lf() { + ( + printf '\x1b[01;34;4m%s\x1b[0m\n' "$(pwd)" + la -w 76 --color * \ + | sed ' + s/^.*[^:]$/ \0/ + s/^\(.*\):$/\x1b[01;34m\1\x1b[0m:/ + /^$/d + ' + ) \ + | more -f +} + +gitf() { + echo ">>>" + git fetch + echo "<<<" + gitl + echo "---" + git status +} + ## Local