zsh:alias: Add calculator with output in hex
I never used the old hex alias.
This commit is contained in:
@@ -137,6 +137,9 @@ fi
|
|||||||
#
|
#
|
||||||
# TODO: do not print values if they are zero
|
# TODO: do not print values if they are zero
|
||||||
alias duration="dc -e '?60~r60~r24~rn[d ]nn[h ]nn[m ]nn[s]p'"
|
alias duration="dc -e '?60~r60~r24~rn[d ]nn[h ]nn[m ]nn[s]p'"
|
||||||
|
alias udsk='udisksctl'
|
||||||
|
# calculator with output in hex (goes well together with option C_BASES)
|
||||||
|
alias hex='() { printf "%s\n" "$(([#16] $*))" }'
|
||||||
|
|
||||||
# Precommand modifiers
|
# Precommand modifiers
|
||||||
alias mkdir='nocorrect mkdir'
|
alias mkdir='nocorrect mkdir'
|
||||||
@@ -162,7 +165,6 @@ fi
|
|||||||
(( ! $+commands[trash] )) ||
|
(( ! $+commands[trash] )) ||
|
||||||
alias rm='trash'
|
alias rm='trash'
|
||||||
if (( $+commands[xxd] )); then
|
if (( $+commands[xxd] )); then
|
||||||
alias hex='xxd'
|
|
||||||
alias bin='xxd -b -c4 | cut -d" " -f2-5'
|
alias bin='xxd -b -c4 | cut -d" " -f2-5'
|
||||||
fi
|
fi
|
||||||
if (( $+commands[nvim] )); then
|
if (( $+commands[nvim] )); then
|
||||||
|
|||||||
Reference in New Issue
Block a user