/qwer-ps1

hyper ultra awesome ultimate manager for your $PROMPT

Primary LanguageShellMIT LicenseMIT

qwer-ps1

This is too simple, highly extendable manager for your $PROMPT of zsh. Inspired by asdf.

requirements

  • zsh
  • git

install

git clone https://github.com/ya0201/qwer-ps1 /path/you/want/to/clone
echo "source /path/to/qwer-ps1.zsh" >> ${HOME}/.zshrc
echo 'eval "$(qwer-ps1 init)"' >> ${HOME}/.zshrc

usage

# add plugin
qwer-ps1 plugin add oscloud https://github.com/ya0201/qwer-ps1-oscloud

# use plugin to show oscloud in your $PROMPT
echo 'PROMPT=${PROMPT}'\''$(qwer-ps1 show-current oscloud)'\' >> ${HOME}/.zshrc

or, you can write like this in your .zshrc

# qwer-ps1
source /path/to/qwer-ps1.zsh
if ! qp1 p ii oscloud; then
  qp1 p a oscloud https://github.com/ya0201/qwer-ps1-oscloud
fi
PROMPT=${PROMPT}'$(qp1 s oscloud)'

If you want to know more detail, see wiki!

customize

By default, qwer-ps1 use '[]' and red. So, if you write like this ⬇️

source /path/to/qwer-ps1.zsh
if ! qp1 p ii oscloud; then
  qp1 p a oscloud https://github.com/ya0201/qwer-ps1-oscloud
fi
PROMPT='$(qp1 s oscloud) '${PROMPT}

then it appears like this ⬇️
スクリーンショット 2021-11-25 23 00 29

You can customize this behavior using -b (brackets) and -c (color) option.

source /path/to/qwer-ps1.zsh
if ! qp1 p ii oscloud; then
  qp1 p a oscloud https://github.com/ya0201/qwer-ps1-oscloud
fi
- PROMPT='$(qp1 s oscloud) '${PROMPT}
+ PROMPT='$(qp1 -b {} -c yellow s oscloud) '${PROMPT}

スクリーンショット 2021-11-25 23 02 50