sh: Add distrobox alias and enable displaying host
Add a simple alias to quickly use distrobox with `db` alias, and modify
pure prompt initialization slightly so that it displays a hostname when
in a distrobox container (akin to operating from ssh or normal container
usage).
HACKY implementation makes use of both an internal pure prompt api
(see here https://github.com/sindresorhus/pure/issues/585)
and a distrobox env var that I am not sure how exposed it is either.
Powerlevel10k uses a similar method though, so maybe it is fine
(see here 33916e91a7/internal/p10k.zsh (L8336)).
This commit is contained in:
parent
99a3c0d314
commit
274cc8026a
2 changed files with 9 additions and 0 deletions
|
|
@ -119,3 +119,8 @@ elif exist ipython; then
|
|||
elif exist python; then
|
||||
alias py=python
|
||||
fi
|
||||
|
||||
# distrobox
|
||||
if exist distrobox; then
|
||||
alias db=distrobox
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue