summaryrefslogtreecommitdiff
path: root/.config/bash/aliases.sh
diff options
context:
space:
mode:
Diffstat (limited to '.config/bash/aliases.sh')
-rw-r--r--.config/bash/aliases.sh16
1 files changed, 6 insertions, 10 deletions
diff --git a/.config/bash/aliases.sh b/.config/bash/aliases.sh
index c9a1987..28b9923 100644
--- a/.config/bash/aliases.sh
+++ b/.config/bash/aliases.sh
@@ -6,10 +6,11 @@
# Set up colors and settings for ls/dir/vdir #
######################################################################
if [ -x "`which dircolors`" ]; then
- eval "`dircolors -b`"
+ eval "$(dircolors -p | cat - "${XDG_CONFIG_HOME}/dir_colors" |
+ dircolors -b -)"
alias ls='ls -1v --color=auto'
alias dir='dir -v --color=auto'
- alias vdir='vdir -v--color=auto'
+ alias vdir='vdir -v --color=auto'
for xgrep in ${PATH//:/\/*grep }/*grep; do
if [ -f "$xgrep" ]; then
@@ -43,16 +44,11 @@ alias gitk='gitk --all --date-order'
alias userctl='systemctl --user'
######################################################################
-# Remember lat/long for redshift #
-######################################################################
-redshift='redshift -l39.9030:85.9979'
-alias gtk-redshift="gtk-$redshift"
-alias redshift="$redshift"
-unset redshift
-
-######################################################################
# Some almost-function aliases #
######################################################################
alias lock="clear; away -C 'This terminal is locked'"
alias plock="term-title Terminal Locked;lock"
mvln() { mv $1 $2; ln -s $2 $1; }
+jarls() { jar tf "$1" | sed -n 's/\.class$//p' | LC_ALL=C sort | xargs -r -d $'\n' javap -classpath "$1"; }
+tarls() { local file; for file in "$@"; do bsdtar tf "$file" | sed "s|^|$file:|"; done; }
+jarmain() { jarls "$1" 2>/dev/null | grep -E '(^[a-z]|public static void main\(java\.lang\.String\[\]\))' | grep -B1 '^ '; }