-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaliases
More file actions
76 lines (56 loc) · 1.51 KB
/
aliases
File metadata and controls
76 lines (56 loc) · 1.51 KB
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
69
70
71
72
73
74
75
#!/usr/bin/env bash
# System dependent
colorflag="-G"
# Easier navigation
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../../"
alias .....="cd ../../../../"
# Shortcuts
alias down="cd ~/Downloads"
alias docs="cd ~/Documents"
alias p="cd ~/projects"
alias fun="cd ~/projects/fun"
alias os="cd ~/projects/opensource"
alias dot="cd ~/dotfiles"
alias todo="vim ~/org/todo.org"
# Zet
alias zc="cd $HOME/zet"
# Git
alias g="git"
alias gr="git rebase -i HEAD~2"
alias grm="git branch --merged | egrep -v \"(^\*|main)\" | xargs git branch -d"
# Kubectl
alias k="kubectl"
# List in long format
alias l="ls ${colorflag}"
alias ll="ls -lF ${colorflag}"
# List all files
alias la="ls -A ${colorflag}"
# List all directories
alias lsd="l | grep --color=never '^d'"
# Use color output for ls
alias ls="command ls ${colorflag}"
# Get ip4 address
alias ip4="hostname -I | awk '{print \$1}'"
# Colorize grep output
alias grep="grep --color=auto"
# Alias deprecated grep commands
alias fgrep="grep -F"
alias egrep="grep -E"
# Allow aliases to be sudo'ed
alias sudo='sudo '
# Functions
alias urlencode='python3 -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1]);"'
# Elfsquad
eqdir=/home/stan/elfsquad/devstack
if [ -d $eqdir ]; then
source $eqdir/.aliases $eqdir/..
fi
# Miscenallenous
alias bashrc="nvim ~/dotfiles/.bashrc"
alias c="clear"
for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do
alias "${method}"="lwp-request -m '${method}'"
done
alias elfsquad="node /home/stan/elfsquad/elfsquad-cli/dist/index.js"