source bash_func - Programming On Unix

Users browsing this thread: 1 Guest(s)
pkal
Long time nixers
Here's a nifty music playing function from the arch wiki (one doesn't have to use "worstaudio", but I usually do just for the sake of speed - my speakers are bad enough anyway):
Code:
function mm() {
    mpv --no-video --ytdl-format=worstaudio "ytdl://ytsearch:$@"
}

And colourized man pages, from some default debian bashrc:
Code:
man() {
        env \
                LESS_TERMCAP_mb=$(printf "\e[1;31m") \
                LESS_TERMCAP_md=$(printf "\e[1;31m") \
                LESS_TERMCAP_me=$(printf "\e[0m") \
                LESS_TERMCAP_se=$(printf "\e[0m") \
                LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
                LESS_TERMCAP_ue=$(printf "\e[0m") \
                LESS_TERMCAP_us=$(printf "\e[1;32m") \
                EDITOR="" \
                man "$@"
}

(16-11-2017, 08:04 AM)venam Wrote: Or when you mess up your tty
Code:
alias vtn='echo "X[mX(BX)0OX[?5lX7X[rX8" | tr "XO" "\033\017"'
# or
alias vtm='stty;tput reset'

What's the difference between this and just regular "reset"?


Messages In This Thread
source bash_func - by budRich - 16-11-2017, 07:38 AM
RE: source bash_func - by venam - 16-11-2017, 08:04 AM
RE: source bash_func - by pkal - 16-11-2017, 07:15 PM
RE: source bash_func - by venam - 17-11-2017, 01:19 AM