6 points by afefers 14 hours ago | 3 comments
wruza 3 hours ago
Also, gt, gtt, gl, ga, gc, gu, gp, gd, gd2 for git status -s, status, log, add, commit, pull, push, diff, diff to rev. All with useful (to me) flags.
My prompt looks like this:
\n
[<status>] user@site [<cwd>]\n
$
So that I see where I am, all commands line up, the last status is obvious and also there’s never this: $ cat nonewline.txt
Oops no newline$ _
My .inputrc always contains https://stackoverflow.com/a/1030206ndegruchy 13 hours ago
# Only provide CDPATH when interactive...
if [[ $- = *i* ]];
then
export CDPATH=:"$HOME"/Projects/
fi
`CDPATH` is great. It's like having z, j or zoxide installed for configurable paths. While it doesn't fully replace the former, it provides a lot of the useful functionality for me. _cleanup_files() {
# Cleanup files
local OFFENDERS=(
"$HOME"/.java
"$HOME"/.oracle_jre_usage
"$HOME"/.pki
"$HOME"/.wget-hsts
"$HOME"/.xsession-errors
...
)
for FILE in "${OFFENDERS[@]}";
do
if [[ -e "$FILE" ]];
then
trash-put "$FILE"
fi
done
}
# Prompt
export PROMPT_COMMAND=_cleanup_files
There are certain files that get created from various apps that I run that aren't really useful (font caches, etc). Try as I might, I can't get them into appropriate XDG-style locations. I could wrap them in boxxy, but this seems simpler. I put them in the trash in case something blew up and I need to recover it.withinboredom 10 hours ago
fsync = !git pull --rebase && git fetch -p && git branch -vv | grep ': gone]' | awk '{print $1}' | xargs git branch -D
This is probably my most-used alias on my machine, by far.14 hours ago