Update aliases
This commit is contained in:
parent
ed8d7bdb70
commit
67844c6b02
58
aliases
58
aliases
|
@ -251,7 +251,6 @@ alias lca='lein cljsbuild auto dev'
|
||||||
alias ldi='lein deps install'
|
alias ldi='lein deps install'
|
||||||
alias lsd='lein start-dev'
|
alias lsd='lein start-dev'
|
||||||
alias moon='curl wttr.in/moon -A "curl"'
|
alias moon='curl wttr.in/moon -A "curl"'
|
||||||
alias patch='git format-patch HEAD^ --stdout > patch.diff'
|
|
||||||
alias reguard='killall -9 ruby ; guard'
|
alias reguard='killall -9 ruby ; guard'
|
||||||
alias rb='rbenv'
|
alias rb='rbenv'
|
||||||
alias rbg='rbenv gemset active'
|
alias rbg='rbenv gemset active'
|
||||||
|
@ -367,6 +366,10 @@ dl_youtube_vid() {
|
||||||
error "Format: $0 <make folder?> <url> <optional args>\n"
|
error "Format: $0 <make folder?> <url> <optional args>\n"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
if [[ $format == "" ]]; then
|
||||||
|
printf "${BOLD}No format given; using best available.${NORMAL}\n"
|
||||||
|
format="best"
|
||||||
|
fi
|
||||||
|
|
||||||
opts+=" --write-sub --sub-lang en --embed-subs"
|
opts+=" --write-sub --sub-lang en --embed-subs"
|
||||||
|
|
||||||
|
@ -386,11 +389,7 @@ dl_youtube_vid() {
|
||||||
local filename=$(youtube-dl.exe --get-filename -o "$name_format.%(ext)s" $url)
|
local filename=$(youtube-dl.exe --get-filename -o "$name_format.%(ext)s" $url)
|
||||||
filename="${filename:0:4}-${filename:4:2}-${filename:6}"
|
filename="${filename:0:4}-${filename:4:2}-${filename:6}"
|
||||||
|
|
||||||
if [[ $format == "" ]]; then
|
youtube-dl.exe -f $format -o "$filename" $opts $url
|
||||||
youtube-dl.exe -o "$filename" $opts $url
|
|
||||||
else
|
|
||||||
youtube-dl.exe -f $format -o "$filename" $opts $url
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $make_folder == "1" ]]; then
|
if [[ $make_folder == "1" ]]; then
|
||||||
cd ..
|
cd ..
|
||||||
|
@ -528,7 +527,11 @@ dl_twitch_vid() {
|
||||||
if [[ $compress -eq 0 ]]; then
|
if [[ $compress -eq 0 ]]; then
|
||||||
printf "${BOLD}Downloading Twitch vid with no compression.${NORMAL}\n"
|
printf "${BOLD}Downloading Twitch vid with no compression.${NORMAL}\n"
|
||||||
else
|
else
|
||||||
printf "${BOLD}Downloading Twitch vid with compression.${NORMAL}.\n"
|
printf "${BOLD}Downloading Twitch vid with compression.${NORMAL}\n"
|
||||||
|
fi
|
||||||
|
if [[ $format == "" ]]; then
|
||||||
|
printf "${BOLD}No format given; using best available.${NORMAL}\n"
|
||||||
|
format="best"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $make_folder == "1" ]]; then
|
if [[ $make_folder == "1" ]]; then
|
||||||
|
@ -722,10 +725,10 @@ alias ig-download-and-hflip='dl_instagram_vid_and_hflip '
|
||||||
# Twitch Vid DL
|
# Twitch Vid DL
|
||||||
alias tw-src='dl_twitch_vid "Source" $SHORTNAME_OFF $COMPRESSION_OFF'
|
alias tw-src='dl_twitch_vid "Source" $SHORTNAME_OFF $COMPRESSION_OFF'
|
||||||
|
|
||||||
alias tw='dl_twitch_vid "1080p" $SHORTNAME_OFF $COMPRESSION_OFF'
|
alias tw='dl_twitch_vid "" $SHORTNAME_OFF $COMPRESSION_OFF'
|
||||||
alias tw-compressed='dl_twitch_vid "1080p" $SHORTNAME_OFF $COMPRESSION_ON'
|
alias tw-compressed='dl_twitch_vid "" $SHORTNAME_OFF $COMPRESSION_ON'
|
||||||
alias tw-shortname='dl_twitch_vid "1080p" $SHORTNAME_ON $COMPRESSION_OFF'
|
alias tw-shortname='dl_twitch_vid "" $SHORTNAME_ON $COMPRESSION_OFF'
|
||||||
alias tw-shortname-compressed='dl_twitch_vid "1080p" $SHORTNAME_ON $COMPRESSION_ON'
|
alias tw-shortname-compressed='dl_twitch_vid "" $SHORTNAME_ON $COMPRESSION_ON'
|
||||||
alias tw-custom='dl_twitch_vid '
|
alias tw-custom='dl_twitch_vid '
|
||||||
alias tw-chat='dl_twitch_chat'
|
alias tw-chat='dl_twitch_chat'
|
||||||
|
|
||||||
|
@ -744,8 +747,8 @@ alias tw-1080p60-shortname-compressed='dl_twitch_vid "1080p60" $SHORTNAME_ON $CO
|
||||||
alias tw-1080p50-shortname-compressed='dl_twitch_vid "1080p50" $SHORTNAME_ON $COMPRESSION_ON'
|
alias tw-1080p50-shortname-compressed='dl_twitch_vid "1080p50" $SHORTNAME_ON $COMPRESSION_ON'
|
||||||
|
|
||||||
alias tw-720='dl_twitch_vid "720p" $SHORTNAME_OFF $COMPRESSION_OFF'
|
alias tw-720='dl_twitch_vid "720p" $SHORTNAME_OFF $COMPRESSION_OFF'
|
||||||
alias tw-720-compressed='dl_twitch_vid "720p-1" $SHORTNAME_OFF $COMPRESSION_ON'
|
alias tw-720-compressed='dl_twitch_vid "720p" $SHORTNAME_OFF $COMPRESSION_ON'
|
||||||
alias tw-720-shortname='dl_twitch_vid "720p-1" $SHORTNAME_ON $COMPRESSION_OFF'
|
alias tw-720-shortname='dl_twitch_vid "720p" $SHORTNAME_ON $COMPRESSION_OFF'
|
||||||
alias tw-720-60='dl_twitch_vid "720p60" $SHORTNAME_OFF $COMPRESSION_OFF'
|
alias tw-720-60='dl_twitch_vid "720p60" $SHORTNAME_OFF $COMPRESSION_OFF'
|
||||||
alias tw-720-60-shortname='dl_twitch_vid "720p60" $SHORTNAME_ON $COMPRESSION_OFF'
|
alias tw-720-60-shortname='dl_twitch_vid "720p60" $SHORTNAME_ON $COMPRESSION_OFF'
|
||||||
|
|
||||||
|
@ -787,18 +790,18 @@ alias compress-video-hard='_compress_video_hard'
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
|
|
||||||
if [[ '${platform,,}' == *'ming'* ]]; then
|
if [[ '${platform,,}' == *'ming'* ]]; then
|
||||||
# Fix a weird mingw 'not a valid identifierline' error.
|
# Fix a weird mingw 'not a valid identifierline' error.
|
||||||
# Got the fix from https://github.com/Alexpux/MSYS2-packages/issues/735#issuecomment-328938800
|
# Got the fix from https://github.com/Alexpux/MSYS2-packages/issues/735#issuecomment-328938800
|
||||||
alias git="PATH=/usr/bin git"
|
alias git="PATH=/usr/bin git"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git_cmd_wrapper() {
|
git_cmd_wrapper() {
|
||||||
# If no args are provided then run `git status -s`
|
# If no args are provided then run `git status -s`
|
||||||
if [[ $# > 0 ]]; then
|
if [[ $# > 0 ]]; then
|
||||||
git $@
|
git $@
|
||||||
else
|
else
|
||||||
git status -s
|
git status -s
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
git_commit() {
|
git_commit() {
|
||||||
|
@ -817,7 +820,14 @@ git_branch_name() {
|
||||||
}
|
}
|
||||||
|
|
||||||
git_nuke() {
|
git_nuke() {
|
||||||
git checkout master && git branch -D $1 && git push origin :$1
|
git checkout master && git branch -D $1 && git push origin :$1
|
||||||
|
}
|
||||||
|
|
||||||
|
git_create_stash_patch() {
|
||||||
|
stashNum="$1"
|
||||||
|
file="stash_$stashNum.patch"
|
||||||
|
git stash show "stash@{$stashNum}" -p > $file
|
||||||
|
printf "${BOLD}${YELLOW}Created $file for stash@{$stashNum}.${NORMAL}\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
alias am='git commit --amend'
|
alias am='git commit --amend'
|
||||||
|
@ -918,11 +928,11 @@ alias gsnapshot='git stash save "snapshot: $(date)" && git stash apply "stash@{0
|
||||||
alias gsh='git show'
|
alias gsh='git show'
|
||||||
alias gshh='git show -w'
|
alias gshh='git show -w'
|
||||||
alias gs='git stash'
|
alias gs='git stash'
|
||||||
|
alias gsc='git_create_stash_patch'
|
||||||
alias gsk='git stash -k -u'
|
alias gsk='git stash -k -u'
|
||||||
alias gssk='git stash save -k -u'
|
alias gssk='git stash save -k -u'
|
||||||
alias gss='git stash save'
|
alias gss='git stash save'
|
||||||
alias gsd='git stash drop'
|
alias gsd='git stash drop'
|
||||||
alias gsdl='git stash drop stash@{0}'
|
|
||||||
alias gsl='git stash list'
|
alias gsl='git stash list'
|
||||||
alias gsi='git stash -p'
|
alias gsi='git stash -p'
|
||||||
alias gsp='git stash pop'
|
alias gsp='git stash pop'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user