1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-12-11 23:53:43 +08:00
ohmyzsh/plugins/toolbox/toolbox.plugin.zsh

13 lines
310 B
Bash
Raw Normal View History

function toolbox_prompt_info() {
[[ -f /run/.toolboxenv ]] && echo "⬢"
}
function toolbox_prompt_name() {
2024-08-02 23:00:55 +08:00
[[ -f /run/.containerenv ]] || return
local _to_print="$(cat /run/.containerenv | awk -F\" '/name/ { print$2 }')"
echo ${_to_print:gs/%/%%}
}
alias tbe="toolbox enter"
alias tbr="toolbox run"