update
This commit is contained in:
parent
1a504267d7
commit
bed862ae5a
2 changed files with 3 additions and 16 deletions
15
.bashrc
15
.bashrc
|
|
@ -1,18 +1,3 @@
|
|||
nvr_git () {
|
||||
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 "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
alias nvim=nvr_git
|
||||
export EDITOR=nvim
|
||||
export PATH="$PATH:$HOME/.cargo/bin"
|
||||
|
|
|
|||
4
nvr_git
Normal file → Executable file
4
nvr_git
Normal file → Executable file
|
|
@ -1,3 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
nvr_git () {
|
||||
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)
|
||||
|
|
@ -12,4 +14,4 @@ nvr_git () {
|
|||
/usr/bin/nvim "$@"
|
||||
fi
|
||||
}
|
||||
nvr_git()
|
||||
nvr_git
|
||||
|
|
|
|||
Loading…
Reference in a new issue