aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbenj <benj@rse8.com>2021-09-28 17:09:24 -0700
committerbenj <benj@rse8.com>2021-09-28 17:09:44 -0700
commitd18fe5d69d5c1dec9d980b06e4a4b312c212c034 (patch)
tree0b70abc261c67988ec1d66409251325cdc4065d8
parent663c42957106cb2ba71075b4debdabe53b528559 (diff)
downloadsetup-d18fe5d69d5c1dec9d980b06e4a4b312c212c034.tar
setup-d18fe5d69d5c1dec9d980b06e4a4b312c212c034.tar.gz
setup-d18fe5d69d5c1dec9d980b06e4a4b312c212c034.tar.bz2
setup-d18fe5d69d5c1dec9d980b06e4a4b312c212c034.tar.lz
setup-d18fe5d69d5c1dec9d980b06e4a4b312c212c034.tar.xz
setup-d18fe5d69d5c1dec9d980b06e4a4b312c212c034.tar.zst
setup-d18fe5d69d5c1dec9d980b06e4a4b312c212c034.zip
include idf env setup and PS1 flag
Diffstat (limited to '')
-rw-r--r--.bashrc11
1 files changed, 9 insertions, 2 deletions
diff --git a/.bashrc b/.bashrc
index e4702ae..5481eb6 100644
--- a/.bashrc
+++ b/.bashrc
@@ -19,6 +19,12 @@ function show_opam_switch () {
fi
}
+function idf_venv() {
+ if [ ! -z "$IDF_PATH" ]; then
+ echo "(idf-venv) "
+ fi
+}
+
# mkdir and follow into dir
function mkdirf () {
mkdir -p $1 && cd $1
@@ -34,9 +40,9 @@ if [ -n "$SSH_CLIENT" ]; then
ssh_text="ssh"
fi
if [ -z $STY ]; then
- export PS1="\[\033[0;34m\]\$(show_opam_switch)\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h\[\033[36;1m\]#$ssh_text\[\033[32m\]:\[\033[33;1m\]\W\[\033[m\]\[\033[34;1m\]\$(parse_git_branch)\[\033[m\]$ "
+ export PS1="\[\033[1;36m\]\$(idf_venv)\[\033[0;34m\]\$(show_opam_switch)\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h\[\033[36;1m\]#$ssh_text\[\033[32m\]:\[\033[33;1m\]\W\[\033[m\]\[\033[34;1m\]\$(parse_git_branch)\[\033[m\]$ "
else
- export PS1="\[\033[0;34m\]\$(show_opam_switch)\[\033[36m\]\u\[\033[m\]@\[\033[32m\]$STY\[\033[36;1m\]#$ssh_text\[\033[32m\]:\[\033[33;1m\]\W\[\033[m\]\[\033[34;1m\]\$(parse_git_branch)\[\033[m\]$ "
+ export PS1="\[\033[1;36m\]\$(idf_venv)\[\033[0;34m\]\$(show_opam_switch)\[\033[36m\]\u\[\033[m\]@\[\033[32m\]$STY\[\033[36;1m\]#$ssh_text\[\033[32m\]:\[\033[33;1m\]\W\[\033[m\]\[\033[34;1m\]\$(parse_git_branch)\[\033[m\]$ "
fi
# Alias
@@ -53,6 +59,7 @@ alias grep='grep --color'
alias g='googler'
alias pt='prototool'
alias t='tmux'
+alias idf='. /usr/local/esp-idf/export.sh'
export ALTERNATE_EDITOR=""
export EDITOR="vim"