-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaliases
61 lines (54 loc) · 2.02 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
#!/usr/bin/env bash
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
alias zshconfig="mate ~/.zshrc"
alias ohmyzsh="mate ~/.oh-my-zsh"
alias update_note="cd $HOME/Documents/GitHub/Markdown4Zhihu && python3 zhihu-publisher.py --input update"
alias fdrecent="fd . -0 -t f | xargs -0 stat -f '%m%t%Sm %N' | sort -n | cut -f2- | tail -n 1"
alias pip3="noglob python3 -m pip"
alias pip="noglob python -m pip"
# alias base
alias v='vim'
alias ll='ls -aGhlt'
alias la='ls -a'
alias l='ls -CF'
alias cls='clear'
alias dc='cd'
alias gs='git status'
alias gc='git commit'
alias gqa='git add .'
alias glast='git last | head -1 | cut -f2- -d '\'' '\'' | xargs git show'
alias gclean='git reset --hard && git clean -dfx'
alias v="vim"
alias mv="mv -i" # -i prompts before overwrite
alias mkdir="mkdir -p" # -p make parent dirs as needed
alias df="df -h" # -h prints human readable format
alias f="fuck"
if [[ -z $SSH_CONNECTION ]]; then
alias opensub='open -a "sublime text"'
fi
alias vfzf='vim $(fzf)' #vim打开搜索到的结果文件
alias cdfzf='cd $(find * -type d | fzf)'
alias gitfzf='git checkout $(git branch -r | fzf)'
# alias debugging
alias sudo='sudo ' # https://linuxhandbook.com/run-alias-as-sudo/
alias pstack='gdb -q --batch --ex "set height 0" -ex "thread apply all bt" '
alias pstackfull='gdb -q --batch --ex "set height 0" -ex "thread apply all bt full" '
alias straceopen='strace -e "open" -e "openat" '
# alias docker
alias dkst="docker stats"
alias dkps="docker ps"
alias dklog="docker logs"
alias dkpsa="docker ps -a"
alias dkimgs="docker images"
alias dkcpup="docker-compose up -d"
alias dkcpdown="docker-compose down"
alias dkcpstart="docker-compose start"
alias dkcpstop="docker-compose stop"
# alias code-reading
alias cpptree="~/dotfiles/cpp_etudes/cpptree.pl"
alias calltree="~/dotfiles/cpp_etudes/calltree.pl"