-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaliases
More file actions
47 lines (38 loc) · 1.45 KB
/
aliases
File metadata and controls
47 lines (38 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
#
# A set of common aliases.
#
# Sean Nesdoly
# 2017-08-15
# Common shortcuts
alias rm="rm -i"
alias mv="mv -i"
alias cp="cp -i"
alias ls="ls -F --color=auto"
alias ll="ls -lF --color=auto"
alias less="less -iRX"
alias g="git"
alias tree="tree -C" # add colours
alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"
# Run bash explicitly under the arm64 architecture
[ -x /opt/homebrew/bin/bash ] && \
alias armbash="arch -arm64 /opt/homebrew/bin/bash --login";
# Homebrew running under Apple's arm64 architecture (NOT with Rosetta 2)
[ -x /opt/homebrew/bin/brew ] && \
alias abrew="arch -arm64 /opt/homebrew/bin/brew"
# Homebrew running under Intel's x86_64 architecture (via Rosetta 2)
[ -x /usr/local/bin/brew ] && \
alias ibrew="arch -x86_64 /usr/local/bin/brew"
# Always enable colored `grep` output
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
# Print each PATH entry on a separate line
alias path='echo -e ${PATH//:/\\n}'
# Correct previous console commands with `thefuck` utility
command -v thefuck > /dev/null && eval "$(thefuck --alias)"
# Slurm workload manager
alias sq='squeue -u "$USER"'
# Hide/show all desktop icons (useful when presenting)
alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder"
alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder"