Update aliases
This commit is contained in:
@@ -6,6 +6,32 @@ function activate_virtualenv() {
|
||||
fi
|
||||
}
|
||||
|
||||
function play {
|
||||
# Skip DASH manifest for speed purposes. This might actually disable
|
||||
# being able to specify things like 'bestaudio' as the requested format,
|
||||
# but try anyway.
|
||||
# Get the best audio that isn't WebM, because afplay doesn't support it.
|
||||
# Use "$*" so that quoting the requested song isn't necessary.
|
||||
youtube-dl --default-search=ytsearch: \
|
||||
--youtube-skip-dash-manifest \
|
||||
--output="${TMPDIR:-/tmp/}%(title)s-%(id)s.%(ext)s" \
|
||||
--restrict-filenames \
|
||||
--format="bestaudio[ext!=webm]" \
|
||||
--exec=afplay "$*"
|
||||
}
|
||||
|
||||
function mp3 {
|
||||
# Get the best audio, convert it to MP3, and save it to the current
|
||||
# directory.
|
||||
youtube-dl --default-search=ytsearch: \
|
||||
--restrict-filenames \
|
||||
--format=bestaudio \
|
||||
--extract-audio \
|
||||
--format="bestaudio[ext!=webm]" \
|
||||
--audio-quality=1 "$*" \
|
||||
--exec=afplay "$*"
|
||||
}
|
||||
|
||||
function git-new-remote-tracking {
|
||||
git checkout -b $1 && git push -u origin $1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user