Add aliases from mac-dotfiles repo
https://github.com/saibotk/mac-dotfiles/blob/main/aliases.zsh
This commit is contained in:
parent
ae59306d0b
commit
f338ff46c1
3 changed files with 56 additions and 13 deletions
|
@ -1,6 +1,9 @@
|
||||||
# Load common config environment variables
|
# Load common config environment variables
|
||||||
source config.env
|
source config.env
|
||||||
|
|
||||||
|
# Load aliases
|
||||||
|
source $DOTFILES/zsh/aliases.zsh
|
||||||
|
|
||||||
# Load zsh-snap (znap) plugin manager
|
# Load zsh-snap (znap) plugin manager
|
||||||
zstyle ':znap:*' repos-dir ~/.znap
|
zstyle ':znap:*' repos-dir ~/.znap
|
||||||
source ~/.znap/znap/znap.zsh
|
source ~/.znap/znap/znap.zsh
|
||||||
|
@ -11,6 +14,11 @@ _has() {
|
||||||
return $( whence $1 >/dev/null )
|
return $( whence $1 >/dev/null )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# autocomplete settings
|
||||||
|
zstyle ':autocomplete:tab:*' widget-style menu-select
|
||||||
|
zstyle ':autocomplete:*' fzf-completion yes
|
||||||
|
zstyle ':autocomplete:*' min-input 2
|
||||||
|
|
||||||
# Plugins
|
# Plugins
|
||||||
znap source ohmyzsh/ohmyzsh lib/{git,theme-and-appearance}
|
znap source ohmyzsh/ohmyzsh lib/{git,theme-and-appearance}
|
||||||
znap source ohmyzsh/ohmyzsh plugins/{per-directory-history,git}
|
znap source ohmyzsh/ohmyzsh plugins/{per-directory-history,git}
|
||||||
|
@ -24,11 +32,6 @@ znap source unixorn/fzf-zsh-plugin
|
||||||
# Extra init code needed for zcolors.
|
# Extra init code needed for zcolors.
|
||||||
znap eval zcolors "zcolors ${(q)LS_COLORS}"
|
znap eval zcolors "zcolors ${(q)LS_COLORS}"
|
||||||
|
|
||||||
# autocomplete settings
|
|
||||||
zstyle ':autocomplete:tab:*' widget-style menu-select
|
|
||||||
zstyle ':autocomplete:*' fzf-completion yes
|
|
||||||
zstyle ':autocomplete:*' min-input 2
|
|
||||||
|
|
||||||
# ZSH prompt
|
# ZSH prompt
|
||||||
if _has starship;
|
if _has starship;
|
||||||
then
|
then
|
||||||
|
@ -38,14 +41,6 @@ else
|
||||||
znap prompt ohmyzsh/ohmyzsh robbyrussell
|
znap prompt ohmyzsh/ohmyzsh robbyrussell
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# aliases
|
|
||||||
alias ll='ls -l'
|
|
||||||
alias la='ls -la'
|
|
||||||
alias :q='exit'
|
|
||||||
alias fresh="source ~/.zshrc"
|
|
||||||
alias yarn="firejail yarn"
|
|
||||||
alias npm="firejail npm"
|
|
||||||
|
|
||||||
# localcommands
|
# localcommands
|
||||||
if [ -f $DOTFILES/zsh/localcommands ]
|
if [ -f $DOTFILES/zsh/localcommands ]
|
||||||
then
|
then
|
47
zsh/aliases.zsh
Normal file
47
zsh/aliases.zsh
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
# Shortcuts
|
||||||
|
alias copyssh="cat $HOME/.ssh/id_rsa.pub | xclip -sel clip"
|
||||||
|
alias reloadshell="source $HOME/.zshrc"
|
||||||
|
alias ll="ls -AhlFo --color --group-directories-first"
|
||||||
|
alias shrug="echo '¯\_(ツ)_/¯' | xclip -sel clip"
|
||||||
|
alias c="clear"
|
||||||
|
alias compile="commit 'compile'"
|
||||||
|
alias version="commit 'version'"
|
||||||
|
|
||||||
|
# Directories
|
||||||
|
alias dotfiles="cd $DOTFILES"
|
||||||
|
|
||||||
|
# Laravel
|
||||||
|
alias a="php artisan"
|
||||||
|
alias mfs="php artisan migrate:fresh --seed"
|
||||||
|
alias tinker="php artisan tinker"
|
||||||
|
alias seed="php artisan db:seed"
|
||||||
|
alias serve="php artisan serve"
|
||||||
|
|
||||||
|
# PHP
|
||||||
|
alias cfresh="rm -rf vendor/ composer.lock && composer i"
|
||||||
|
|
||||||
|
# JS
|
||||||
|
alias nfresh="rm -rf node_modules/ package-lock.json && npm install"
|
||||||
|
alias watch="npm run watch"
|
||||||
|
|
||||||
|
# Git
|
||||||
|
alias gst="git status"
|
||||||
|
alias gb="git branch"
|
||||||
|
alias gc="git checkout"
|
||||||
|
alias gl="git log --oneline --decorate --color"
|
||||||
|
alias amend="git add . && git commit --amend --no-edit"
|
||||||
|
alias commit="git add . && git commit -m"
|
||||||
|
alias diff="git diff"
|
||||||
|
alias force="git push --force"
|
||||||
|
alias nuke="git clean -df && git reset --hard"
|
||||||
|
alias pop="git stash pop"
|
||||||
|
alias pull="git pull"
|
||||||
|
alias push="git push"
|
||||||
|
alias resolve="git add . && git commit --no-edit"
|
||||||
|
alias stash="git stash -u"
|
||||||
|
alias unstage="git restore --staged ."
|
||||||
|
alias wip="commit wip"
|
||||||
|
|
||||||
|
# Linux aliases
|
||||||
|
alias yarn="firejail yarn"
|
||||||
|
alias npm="firejail npm"
|
1
zsh/config.env
Symbolic link
1
zsh/config.env
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../config.env
|
Loading…
Add table
Reference in a new issue