config/shell: update aliases
This commit is contained in:
parent
1dd3f3d4e7
commit
5638127ff7
|
@ -104,9 +104,10 @@
|
||||||
rh = reset HEAD~
|
rh = reset HEAD~
|
||||||
rs = reset --keep
|
rs = reset --keep
|
||||||
ru = reset --keep @{upstream}
|
ru = reset --keep @{upstream}
|
||||||
|
rg = rmgonebranches
|
||||||
unstage = reset HEAD --
|
unstage = reset HEAD --
|
||||||
gcr = !git gc && git repack -a -d
|
gcr = !git gc && git repack -a -d
|
||||||
|
|
||||||
ready = rebase -i @{push}
|
ready = rebase -i @{push}
|
||||||
format-head = !git stash && git-clang-format HEAD~ && git commit -a --amend --no-edit && git stash pop
|
format-head = !git stash && git-clang-format HEAD~ && git commit -a --amend --no-edit && git stash pop
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,12 @@ alias lst='( last; last -f /var/log/wtmp.1 ) | grep -v "pts/" | tac | less +G'
|
||||||
alias lar='last | tac'
|
alias lar='last | tac'
|
||||||
tr() { tree -a -L 2 --du -h -C "$@" | ${PAGER:-less} }
|
tr() { tree -a -L 2 --du -h -C "$@" | ${PAGER:-less} }
|
||||||
|
|
||||||
alias xo='xdg-open'
|
xo() {
|
||||||
|
while test $# -gt 0; do
|
||||||
|
xdg-open "$1"
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
}
|
||||||
alias sqli='rlwrap sqlite3 -column -header -cmd .tables'
|
alias sqli='rlwrap sqlite3 -column -header -cmd .tables'
|
||||||
alias loc='noglob locate --basename'
|
alias loc='noglob locate --basename'
|
||||||
alias uloc='noglob sudo updatedb && locate --basename'
|
alias uloc='noglob sudo updatedb && locate --basename'
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Show type & contents of given files or PWD
|
# Show type & contents of given files or PWD
|
||||||
|
|
||||||
|
# gets the last arg or current dir
|
||||||
for last; do true; done
|
for last; do true; done
|
||||||
last=${last:-.}
|
last=${last:-.}
|
||||||
file "$last" | grep -v --color=never directory
|
|
||||||
stat -c 'Permissions: %A, Created: %.10w, Modified %.10y, Size: %s' "$last"
|
file "$last" | grep -v --color=never 'directory$'
|
||||||
|
test -e "$last" || exit 1
|
||||||
|
|
||||||
case "$(file --dereference --mime "$last")" in
|
case "$(file --dereference --mime "$last")" in
|
||||||
*inode/directory*) ls -l --color=always --human-readable --group-directories-first --file-type --dereference-command-line --almost-all "$@";;
|
*inode/directory*) ls -l --color=always --human-readable --group-directories-first --file-type --dereference-command-line --almost-all "$@";;
|
||||||
*binary) ;;
|
*binary) ;;
|
||||||
*) $(test -f "$last" -a ! -r "$last") bat --style header "$@";;
|
*) $(test -f "$last" -a ! -r "$last") bat --style header "$@";;
|
||||||
esac
|
esac
|
||||||
|
stat -c 'Permissions: %A, Created: %.10w, Modified %.10y, Size: %s' "$last"
|
||||||
|
|
Loading…
Reference in New Issue