Skip to content

Instantly share code, notes, and snippets.

@nilox94
Created October 19, 2018 19:12
Show Gist options
  • Save nilox94/763c4c84bf77862a91407becd1e1b842 to your computer and use it in GitHub Desktop.
Save nilox94/763c4c84bf77862a91407becd1e1b842 to your computer and use it in GitHub Desktop.
Executes a command and suppress its output
# mute
function mute()
{
${@:1} &> /dev/null
}
# mute completion -*- shell-script -*-
_mute()
{
_init_completion -s || return
_command_offset 1
return
} &&
complete -F _mute mute
# ex: ts=4 sw=4 et filetype=sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment