mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-15 01:48:34 -07:00
fix(toolbox): avoid prompt injection
This commit is contained in:
parent
2cb403e89f
commit
3b5f018f70
@ -3,7 +3,9 @@ function toolbox_prompt_info() {
|
||||
}
|
||||
|
||||
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"
|
||||
|
Loading…
Reference in New Issue
Block a user