fish: add checksum functions
This commit is contained in:
parent
386c9ac793
commit
9c2cdffb7d
@ -54,9 +54,6 @@ test -d /usr/sbin ; and set -x PATH $PATH /usr/sbin
|
|||||||
test -d /sbin ; and set -x PATH $PATH /sbin
|
test -d /sbin ; and set -x PATH $PATH /sbin
|
||||||
|
|
||||||
# Aliases
|
# Aliases
|
||||||
alias afk='pmset displaysleepnow'
|
|
||||||
alias md5sum='md5 -r'
|
|
||||||
alias sha256sum='shasum -a 256'
|
|
||||||
alias vi='nvim'
|
alias vi='nvim'
|
||||||
alias vim='nvim'
|
alias vim='nvim'
|
||||||
|
|
||||||
|
10
fish/functions/md5sum.fish
Normal file
10
fish/functions/md5sum.fish
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
function md5sum --description 'Compute the MD5 checksum'
|
||||||
|
if command -q md5sum
|
||||||
|
command md5sum $argv
|
||||||
|
else if command -q md5
|
||||||
|
command md5 -r $argv
|
||||||
|
else
|
||||||
|
echo "Command(s) not found: md5sum, md5"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
end
|
10
fish/functions/sha256sum.fish
Normal file
10
fish/functions/sha256sum.fish
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
function sha256sum --description 'Compute the SHA-256 checksum'
|
||||||
|
if command -q sha256sum
|
||||||
|
command sha256sum $argv
|
||||||
|
else if command -q shasum
|
||||||
|
command shasum -a 256 $argv
|
||||||
|
else
|
||||||
|
echo "Command(s) not found: sha256sum, shasum"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user