-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.aliases
66 lines (45 loc) · 1.64 KB
/
.aliases
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/env bash
# Easier navigation: .., ..., ~ and -
alias ..='cd ..'
alias cd..="cd .."
alias ...='cd ../..'
function cl() {
cd $@ && ls -Al
}
alias gti='git'
alias rm='safe-rm'
alias finder='open'
alias php-ini='php --ini | grep -e ".ini$"'
alias php-lint='find . -type f \( -not -path "*/vendor/*" \) -name "*.php" -exec php -l {} \; | grep -v "No syntax errors detected"'
##
# history-search
# See http://alias.sh/history-search-0
alias history='history | grep --color=auto'
##
# Compact, colorized git log
# See http://alias.sh/compact-colorized-git-log
alias gitlog="git log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
##
# Git
alias gitgraph='git log --oneline --abbrev-commit --all --graph --decorate --color'
##
# Paul Irish
# See https://github.com/paulirish/dotfiles/blob/master/.aliases
alias cask='brew cask' # i <3 u cask
alias where=which # sometimes i forget
alias hosts='sudo $EDITOR /etc/hosts' # yes I occasionally 127.0.0.1 twitter.com ;)
##
# time to upgrade `ls`
# use coreutils `ls` if possible…
hash gls >/dev/null 2>&1 || alias gls="ls"
# always use color, even when piping (to awk,grep,etc)
if gls --color > /dev/null 2>&1; then colorflag="--color"; else colorflag="-G"; fi;
export CLICOLOR_FORCE=1
# ls options: A = include hidden (but not . or ..), F = put `/` after folders, h = byte unit suffixes
alias ls='gls -AFh ${colorflag} --group-directories-first'
alias ll='ls -l'
alias lsd='ls -l | grep "^d"' # only directories
alias ping='prettyping --nolegend'
alias cat='bat'
alias say='say -v Daniel'
alias php81='/usr/local/opt/php@8.1/bin/php'