mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 13:46:41 +00:00
Only initialize OS-specific shell aliases on the target OS
This commit is contained in:
@@ -3,7 +3,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# System
|
# System
|
||||||
alias o="open"
|
|
||||||
alias s="ssh"
|
alias s="ssh"
|
||||||
alias ec="echo"
|
alias ec="echo"
|
||||||
alias ls="ls -B"
|
alias ls="ls -B"
|
||||||
@@ -41,15 +40,11 @@ if (( $+commands[flutter] )); then
|
|||||||
alias fl="flutter"
|
alias fl="flutter"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Flush DNS cache
|
|
||||||
alias flush_dns="dscacheutil -flushcache"
|
|
||||||
|
|
||||||
# Misc.
|
# Misc.
|
||||||
alias weechat="TERM=screen-256color weechat-curses"
|
alias weechat="TERM=screen-256color weechat-curses"
|
||||||
alias slashdot="ab -kc 50 -t 300"
|
alias slashdot="ab -kc 50 -t 300"
|
||||||
alias digg="ab -kc 50 -t 30"
|
alias digg="ab -kc 50 -t 30"
|
||||||
alias fact="elinks -dump randomfunfacts.com | sed -n '/^| /p' | tr -d \|"
|
alias fact="elinks -dump randomfunfacts.com | sed -n '/^| /p' | tr -d \|"
|
||||||
alias netlisteners='lsof -i -Pn | grep LISTEN'
|
|
||||||
alias servethis="python -c 'import SimpleHTTPServer; SimpleHTTPServer.test()'"
|
alias servethis="python -c 'import SimpleHTTPServer; SimpleHTTPServer.test()'"
|
||||||
alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\'''
|
alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\'''
|
||||||
alias fku="fuck you"
|
alias fku="fuck you"
|
||||||
@@ -80,11 +75,6 @@ mcd() {
|
|||||||
mkdir -p "$1" && cd "$1";
|
mkdir -p "$1" && cd "$1";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Open man page in Preview.
|
|
||||||
pman () {
|
|
||||||
man -t "${1}" | open -f -a /Applications/Preview.app
|
|
||||||
}
|
|
||||||
|
|
||||||
# Extract most common archives with single command.
|
# Extract most common archives with single command.
|
||||||
# - from: http://alias.sh/extract-most-know-archives-one-command
|
# - from: http://alias.sh/extract-most-know-archives-one-command
|
||||||
extract() {
|
extract() {
|
||||||
|
|||||||
@@ -2,5 +2,8 @@
|
|||||||
# Linux specific setup
|
# Linux specific setup
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Aliases
|
||||||
|
alias o="xdg-open"
|
||||||
|
|
||||||
# Ensure 256 color support in Linux
|
# Ensure 256 color support in Linux
|
||||||
export TERM="xterm-256color"
|
export TERM="xterm-256color"
|
||||||
|
|||||||
@@ -2,6 +2,17 @@
|
|||||||
# macOS Specific
|
# macOS Specific
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Aliases
|
||||||
|
alias o="open"
|
||||||
|
|
||||||
|
# Flush DNS cache
|
||||||
|
alias flush_dns="dscacheutil -flushcache"
|
||||||
|
|
||||||
|
# Open man page in Preview.
|
||||||
|
pman () {
|
||||||
|
man -t "${1}" | open -f -a /Applications/Preview.app
|
||||||
|
}
|
||||||
|
|
||||||
# Fix wifi issues on OS X 10.10.x Yosemite.
|
# Fix wifi issues on OS X 10.10.x Yosemite.
|
||||||
# - from: https://medium.com/@mariociabarra/wifried-ios-8-wifi-performance-issues-3029a164ce94
|
# - from: https://medium.com/@mariociabarra/wifried-ios-8-wifi-performance-issues-3029a164ce94
|
||||||
alias fix_wifi="sudo ifconfig awdl0 down"
|
alias fix_wifi="sudo ifconfig awdl0 down"
|
||||||
|
|||||||
Reference in New Issue
Block a user