This commit is contained in:
Jaroslaw Konik 2024-05-31 13:53:25 +02:00
parent 0a982c0e94
commit 30d0d27a48

13
.bashrc
View file

@ -1,7 +1,12 @@
nvr_git () {
local repo_path=$(git rev-parse --show-superproject-working-tree 2>/dev/null)
if [ -n "$repo_path" ]; then
local servername=/tmp/nvr$(echo $repo_path | tr "/" "_")
local main_module_repo_path=$(git rev-parse --show-superproject-working-tree 2>/dev/null)
local repo_path=$(git rev-parse --show-toplevel 2>/dev/null)
if [[ -z "$main_module_repo_path" ]]; then
main_module_repo_path=$repo_path
fi
if [ -n "$main_module_repo_path" ]; then
local servername=/tmp/nvr$(echo $main_module_repo_path | tr "/" "_")
nvr -s --servername $servername "$@"
else
/usr/bin/nvim "$@"
@ -12,6 +17,6 @@ alias nvim=nvr_git
export EDITOR=nvim
export PATH="$PATH:$HOME/.cargo/bin"
. "$HOME/.cargo/env"
eval "$(starship init zsh)"
eval "$(starship init bash)"
alias export_esp=". /home/jaroslaw/bin/export-esp.sh"
alias get_idf='. $HOME/src/esp/esp-idf/export.sh'