themes/base: Refactor prompt strings for python envs

This commit is contained in:
Koichi Murase
2021-12-27 23:29:41 +09:00
parent 81535a1e49
commit 77e5874e62
2 changed files with 69 additions and 14 deletions

View File

@@ -72,6 +72,19 @@
################################################################################
_omb_version=10000
function _omb_util_defun_print {
builtin eval -- "function $1 { local $3; $2 \"\$@\" && printf '%s\n' \"\${$3}\"; }"
}
function _omb_util_defun_deprecate {
local warning=
((_omb_version>=$1)) &&
warning='echo "warning: \`$2'\'' is deprecated. Use \`$3'\''." >&2; '
builtin eval -- "function $2 { $warning$3 \"\$@\"; }"
}
#
# Set Colors
#