~gpanders/dotfiles

ref: 2da1dde5ea566f82ebe6532bc6d3b8670fd77ce8 dotfiles/zsh/.zaliases -rw-r--r-- 1.0 KiB
2da1dde5Greg Anders Note 'open' subcommand opens editor in NOTES_DIR when no argument given 1 year, 3 months ago
                                                                                
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
alias chmod="chmod --preserve-root -v"
alias chown="chown --preserve-root -v"

alias ec="emacsclient -a '' -nc"

alias d="dirs -v"
for index ({1..9}) alias "$index"="cd +${index}"; unset index

alias g="git"

alias grep="grep --color=auto"

alias ls="ls --color=auto"
alias l="ls -lh"
alias ll="ls -Alh"

if (( $+commands[nvim] )); then
    alias v=nvim
    alias vi=nvim
fi

mkdcd() {
    if [[ "$#" -eq 0 ]]; then
        echo "$0: Missing operand"
        return 1
    elif [[ "$#" -gt 1 ]]; then
        echo "$0: Too many arguments"
        return 1
    fi
    mkdir -p "$1"
    cd "$1"
}

alias ipy="ipython"
alias py="python"
alias py2="python2"
alias py3="python3"
alias pipu="pip install -U \$(pip list -o | awk 'NR > 2 {print \$1}' | paste -sd ' ' -)"

alias tmux="tmux -f ${XDG_CONFIG_HOME:-$HOME/.config}/tmux/tmux.conf"
alias weechat="weechat -d ${XDG_CONFIG_HOME:-$HOME/.config}/weechat"

if [ -n $EDITOR ]; then
    alias e="$EDITOR"
fi

if [ -n $BROWSER ]; then
    alias b="$BROWSER"
fi

if [ -n $PAGER ]; then
    alias p="$PAGER"
fi

# vim:ft=zsh