citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

commit 68d4a9530a11b2b86287bea31adc4fb2c14a0407
parent 579038c6136fa9ca544485db912a2d71fbb2e717
Author: William Casarin <jb55@jb55.com>
Date:   Tue, 29 Dec 2020 15:12:37 -0800

add general-status

Diffstat:
Abin/general-status | 18++++++++++++++++++
Mdotfiles/.bash_aliases | 1+
2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/bin/general-status b/bin/general-status @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +export LESS="--quit-if-one-screen" + +(printf "sys: %s@%s\npwd: %s\n" \ + "$USER" \ + "$HOSTNAME" \ + "$PWD" + +if git rev-parse --is-inside-work-tree >/dev/null 2>/dev/null; then + git status -s + git remote -v | grep \(fetch\) | column -t -s $'\t' "$@" + conf="-c branch.color=always -c pager.branch=false" + brconf="--sort=-committerdate" + COLUMNS=$(stty size | cut -d" " -f2) + git $conf branch $brconf -v + git $conf branch $brconf -rv + fi) | $PAGER diff --git a/dotfiles/.bash_aliases b/dotfiles/.bash_aliases @@ -62,6 +62,7 @@ function run_fuzzer() { eval "$(fuzz-run-command "$@")" } +alias s="general-status" alias t="todo.sh" alias e="edit -n" alias g=git