summaryrefslogtreecommitdiff
path: root/sh/aliases
blob: 055c79781c2359bdb2ecf380a86fc04a7bc70368 (plain)
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
#!/bin/sh
## CD Ups
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ......='cd ../../../../..'
alias .......='cd ../../../../../..'
alias ........='cd ../../../../../../..'

COLOR_FLAGS_GNU="--color='auto' --group-directories-first"

[ -f $HOME/.config/sh/weather ] && . $HOME/.config/sh/weather

## Base Utils
case `uname -s` in
  "OpenBSD")
    alias ls="ls -h"
    ;;
  "Linux")
    alias ls="ls -h $COLOR_FLAGS_GNU"
    ;;
esac
alias ll='ls -l'
alias la='ls -A'
alias lla='ls -lA'
alias md='mkdir -p'
alias ch='cd $HOME'
alias du='du -sxhc'

#alias nvim='vim'
alias nv='nvim'
alias v='nvim'
alias lf='lfrun'

## Change utils
alias rm='rm -i'
alias cp='cp -i'

## git stuff
alias gs='git status'
alias commit='git commit -S -m'
alias ga='git add -A'
alias gd='git diff'

## Single Chars
alias r='cd ~ && clear && exec $SHELL'
case "$(echo $0 | xargs basename)" in
  "zsh") alias e='. $ZDOTDIR/.zshrc' ;;
  "ksh"|"oksh") alias e='. ~/.config/kshrc' ;;
esac
alias q='exit'
alias c='clear'
alias m='make'

## Programming
# Rust
alias crr='cargo run --release'
alias cbr='cargo build --release'

## Arch Linux aliases --sudoloop
#alias yu='yay -Syu --noconfirm'

## OpenBSD
alias pq='pkg_info -Q'
alias pu='doas pkg_add -u'
alias pa='doas pkg_add'

## Runit
#alias ursm='env SVDIR="$HOME/.local/sv/" rsm'