-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy path.o
More file actions
11 lines (9 loc) · 576 Bytes
/
Copy path.o
File metadata and controls
11 lines (9 loc) · 576 Bytes
1
2
3
4
5
6
7
8
9
10
11
#! bash
# shellcheck disable=SC2239
# shellcheck disable=SC2218
exec {_o_stderr}>&2
# shellcheck disable=SC2120
function exec { if (( $# )); then builtin exec {_o_stderr}>&- "$@"; else builtin exec "$@"; fi; }
if [[ -t $_o_stderr ]]; then _o_tput_bold=$(tput bold || :); _o_tput_reset=$(tput sgr0 || :); else _o_tput_bold=; _o_tput_reset=; fi
function o { printf -->&$_o_stderr "%s%s:%s%s\\n" "$_o_tput_bold" "${0##*/}" "$_o_tput_reset" "$(printf " %q" "$@")"; "$@"; }
function oo { printf -->&$_o_stderr "%s%s:%s %s\\n" "$_o_tput_bold" "${0##*/}" "$_o_tput_reset" "$*"; }