mirror of
https://github.com/wahyd4/dotfiles.git
synced 2026-08-10 05:16:01 +10:00
.aliases: Use command -v instead of type -t
`type -t` is not as portable (i.e., not in POSIX) as `command -v`, and `command -v` also takes aliases and functions into account. Ref. #109.
This commit is contained in:
committed by
Mathias Bynens
parent
03f1e47c88
commit
559ccb5437
@@ -63,10 +63,10 @@ alias sniff="sudo ngrep -d 'en1' -t '^(GET|POST) ' 'tcp and port 80'"
|
||||
alias httpdump="sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E \"Host\: .*|GET \/.*\""
|
||||
|
||||
# Canonical hex dump; some systems have this symlinked
|
||||
type -t hd > /dev/null || alias hd="hexdump -C"
|
||||
command -v hd > /dev/null || alias hd="hexdump -C"
|
||||
|
||||
# OS X has no `md5sum`, so use `md5` as a fallback
|
||||
type -t md5sum > /dev/null || alias md5sum="md5"
|
||||
command -v md5sum > /dev/null || alias md5sum="md5"
|
||||
|
||||
# Trim new lines and copy to clipboard
|
||||
alias c="tr -d '\n' | pbcopy"
|
||||
|
||||
Reference in New Issue
Block a user