mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-07-01 22:09:25 +00:00
feat(helper): add os-type helper functions
Add the following functions: - is-darwin - is-linux - is-bsd - is-cygwin And apply them everywhere I found code doing that what these functions do.
This commit is contained in:
committed by
Kaleb Elwert
parent
1b99be879c
commit
f4ca9ebfc9
@ -134,9 +134,9 @@ if zstyle -t ':prezto:module:utility:grep' color; then
|
||||
fi
|
||||
|
||||
# macOS Everywhere
|
||||
if [[ "$OSTYPE" == darwin* ]]; then
|
||||
if is-darwin; then
|
||||
alias o='open'
|
||||
elif [[ "$OSTYPE" == cygwin* ]]; then
|
||||
elif is-cygwin; then
|
||||
alias o='cygstart'
|
||||
alias pbcopy='tee > /dev/clipboard'
|
||||
alias pbpaste='cat /dev/clipboard'
|
||||
@ -166,7 +166,7 @@ fi
|
||||
alias df='df -kh'
|
||||
alias du='du -kh'
|
||||
|
||||
if [[ "$OSTYPE" == (darwin*|*bsd*) ]]; then
|
||||
if is-darwin || is-bsd; then
|
||||
alias topc='top -o cpu'
|
||||
alias topm='top -o vsize'
|
||||
else
|
||||
|
Reference in New Issue
Block a user