This repository has been archived by the owner on Jun 30, 2022. It is now read-only.
generated from aubreypwd/zsh-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzsh-plugin-my-aliases.plugin.zsh
104 lines (84 loc) · 2.95 KB
/
zsh-plugin-my-aliases.plugin.zsh
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#!/bin/zsh
###
# Aliases
#
# @since Thursday, 10/1/2020 Moved over from .config
# @since Apr 19, 2022 Move to own plugin.
##
alias cat="bat"
alias edit="subl -n"
alias e="edit"
alias editzsh="subl -n ~/.zshrc"
alias editgit="subl -n ~/.gitconfig"
alias editssh="subl -n ~/.ssh/config"
alias nw='ttab -w' # New window.
alias nt='ttab ' # New tab.
alias c=clear
alias tower='gittower'
alias ntx="nt && x"
alias na="n auto" # Install the preferred version.
alias fakedata="fakedata --limit 1"
alias golive="ngrok http -host-header=rewrite $1:443"
# Easy composer commands.
alias cu="composer uninstall"
alias cis="composer install --prefer-source" # source install.
alias cid="composer install --prefer-dist" # dist install.
alias crd="composer uninstall && composer install --prefer-dist" # reinstall with dist.
alias crs="composer uninstall && composer install --prefer-source" # reinstall with source.
alias ccc="composer clearcache && composer global clearcache"
# Composer versions
alias c@2="composer self-update --2"
alias c@1="composer self-update --1"
# Fuzzy find at certain levels easily.
alias fdd="fd 2" # Two levels.
alias fd!="fd 10" # Deeper.
alias fd~="fd 50" # Super deep.
# Misc.
alias vim="vim -c 'startinsert'" # Start Vim in insert mode (mostly for commit writing).
alias repo="cd ~/Repos && fdd" # An easy way to get to a repo using my ffd command.
alias loc="cd ~/Sites/Local && fd && cd app/public || true" # Quick way to get to a site
alias site="cd ~/Sites && fd || true"
alias antigenfd="cd ~/.antigen/bundles/aubreypwd && fd" # An easy way to get to a bundle.
alias locals="cd ~/Sites/Local && fd 3" # An easy way to get to a local.
alias high='highlight -O ansi'
# Installs (NPM)
alias npmai="n auto && npm i"
alias npmaci="n auto && npm ci"
# Build (NPM)
alias npmcib="npmaci && npmrb && b"
alias npmib="npmai && npmrb && b"
alias npmrb="npm run build && b"
# Dev (NPM)
alias npmcid="npmaci && npmrd"
alias npmid="npmai && npmrd"
alias npmibd="npmai && npmrb && npmrd"
alias npmrd="npm run dev || npm run watch || npm run start || true"
# Homebrew
alias brewd="brew bundle dump --file=$HOME/.Brewfile --verbose --all --describe --force --no-lock" # Dump what's installed to my Brewfile
# Sounds
alias bell="tput bel"
alias beep="bell"
alias b="bell"
# diff folders
alias diffd="diff -rq" # Diff a directory.
# vcsh
alias pub='vcsh pub'
alias priv='vcsh priv'
# Misc
alias matrix='cmatrix'
# WP-CLI
alias wpeach='wp site list --field=url | xargs -n1 -I % wp --url=%' # On each subsite, run a command.
# xattr
alias clearatts="xattr -cr"
# curl
if [[ $( command -v http ) ]]; then
alias curl='http'
fi
# Valet
alias db='mycli -u root -h 127.0.0.1'
# Finder
alias finder='open -F -a Finder' # Open Finder but remember the window size when you open.
# DNS
alias flushdns='sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder'
# AwesomeMotive / AffiliateWP
alias affwp:build='composer install || composer update && na && npm ci || npm i && npm run build'