-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zsh_aliases
40 lines (33 loc) · 1.14 KB
/
.zsh_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
# COLORED OUTPUT FOR SOME APPS
alias grep='grep --color=auto'
alias ls='ls --color=auto --time-style +%Y-%m-%d\ %H:%M'
# SHORTCUTS
alias ll="ls -l"
alias la="ls -a"
alias ":q"="clear && exit"
alias bones='grep -vE "^ *#|^ *$"'
# DEFAULT BEHAVIOUR
alias dvtm="dvtm -m \<"
alias dtach="cd && dtach"
#alias aptitude="dtach -A aptitude aptitude"
# BACKUP USER CONFIG TO GITHUB
alias github_config_update='cd && git commit -a -m "`date`" && git push'
# MAKE DIR AND CHANGE TO IT
mkcd () {mkdir $1; cd $1}
# MY QUOTES DB :)
alias "quote_add"="(echo; date; cat) >> ~/.quotes.txt"
alias "quote_show"="cat ~/.quotes.txt"
# WRITE CUE-SHEET INTO FLAC FILE (TO MAKE IT USABLE BY MPD)
cue2flac () {
if [[ ( -z "$*" || -z "$2" || -n "$3" ) ]];
then
echo -e "Error: wrong number of arguments\n\nUsage: cue2flac file.cue file.flac\n Will write cue sheet into flac file";
else
metaflac --set-tag-from-file=CUESHEET="$1" --import-cuesheet-from="$1" "$2";
fi
}
# SHOW PERMISSIONS + LS
ls-rights () {
[ -z "$*" ] && stat -c "%U:%G %a %n" "$PWD"/* && return 0
[ -d "$1" ] && stat -c "%U:%G %a %n" "$1"/* || stat -c "%U:%G %a %n" "$1"
}