-
Notifications
You must be signed in to change notification settings - Fork 0
/
.aliases
48 lines (39 loc) · 1.28 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
#Make shorthands for common flags
# alias ll="ls -lh"
## Alias can be composed
# alias la="ls -A"
# alias lla="la -l"
## To ignore an alias run it prepended with \
# \ls
## Or disable an alias altogether with unalias
# unalias la
## To get an alias definition just call it with alias
# alias ll
##Will print ll='ls -lh
# Save a lot of typing
alias v="vim"
alias t="tmux"
alias ga="git add"
alias gaa="git add --all"
alias gc="git commit"
alias gs="git status"
alias gp="git push"
alias xt="TERM=xterm-256color"
# Mistyping
alias dc="cd"
# Overwrite existing commands for better defaults
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
# OS specific
# | |
# | WSL |
# | |
alias cdd="cd /mnt/d/"
alias cdc="cd /mnt/c/"
alias cddesktop="cd /mnt/c/Users/gahme/Desktop"
alias paste.exe="powershell.exe Get-Clipboard"
# This creates a temporary function f, which is passed the arguments.
# Alias arguments are only passed at the end. Note that f is called at the very end of the alias.
# The unset -f removes the function definition as the alias is executed so it doesn't hang around afterwards.
alias clip='f(){ "$@" | clip.exe; unset -f f; }; f'