-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
68 lines (56 loc) · 1.77 KB
/
.zshrc
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
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export PATH=/opt/homebrew/bin:$PATH
export ZSH="/Users/kiumarsjahandel/.oh-my-zsh"
export DEFAULT_USER="kiumarsjahandel"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="agnoster"
plugins=(git macos)
source $ZSH/oh-my-zsh.sh
alias ..="cd .."
alias cd..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias ~="cd ~" # `cd` is probably faster to type though
alias -- -="cd -"
alias o="open ."
alias ll="ls -la -G"
alias g="git"
alias gp="git pull"
alias gundo="git reset --soft HEAD~"
alias gamend="git commit -av --amend --no-edit"
alias zshconfig="code ~/.zshrc"
alias install="brew install"
alias uninstall="brew uninstall"
alias c='pygmentize -O style=monokai -f console256 -g'
# FUNCTIONS
function hl (){
highlight -O rtf "$1" | pbcopy
echo "code is copied to clipboard"
}
# Create a new directory and enter it
function md() {
mkdir -p "$@" && cd "$@"
}
function code {
open -a '/Volumes/Macintosh HD/Applications/Visual Studio Code.app' "$1"
}
# Go to the root of the current git project, or just go one folder up
function up() {
export git_dir="$(git rev-parse --show-toplevel 2> /dev/null)"
if [ -z $git_dir ]
then
cd ..
else
cd $git_dir
fi
}
export PATH="/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.0.0/bin:$PATH"
eval "$(rbenv init - zsh)"
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"