mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-12 20:21:02 +01:00
fix(toolbox): avoid prompt injection
This commit is contained in:
parent
2cb403e89f
commit
3b5f018f70
1 changed files with 3 additions and 1 deletions
|
@ -3,7 +3,9 @@ function toolbox_prompt_info() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function toolbox_prompt_name() {
|
function toolbox_prompt_name() {
|
||||||
[[ -f /run/.containerenv ]] && cat /run/.containerenv | awk -F\" '/name/ { print$2 }'
|
[[ -f /run/.containerenv ]] || return
|
||||||
|
local _to_print="$(cat /run/.containerenv | awk -F\" '/name/ { print$2 }')"
|
||||||
|
echo ${_to_print:gs/%/%%}
|
||||||
}
|
}
|
||||||
|
|
||||||
alias tbe="toolbox enter"
|
alias tbe="toolbox enter"
|
||||||
|
|
Loading…
Reference in a new issue