5

In zsh, I can specify default program to open which file extension like alias -s {mkv,mpg}='mplayer' . I runs fine but what I really want is to run mplayer <filename> & so it won't produce technical stuffs and 'stealing' my current shell session.

How can I make this happen ?

Thanks for reading :)

8

You either provide a wrapper script or a function doing what you need, e.g:

background() {
  "$@" &
}

and use the function/script instead:

alias -s {mkv,mpg}='background mplayer'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.