update
This commit is contained in:
parent
36e7943374
commit
9f9dc823b9
1 changed files with 17 additions and 0 deletions
17
nvim_remote
Executable file
17
nvim_remote
Executable file
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
path=$(cut -d " " -f 2 <<< $@)
|
||||||
|
dir=$(dirname $path)
|
||||||
|
cd $dir
|
||||||
|
args=$@
|
||||||
|
|
||||||
|
repo_path=$(git rev-parse --show-toplevel 2>/dev/null)
|
||||||
|
cd $repo_path
|
||||||
|
if [ -n "$repo_path" ]; then
|
||||||
|
servername=/tmp/nvr$(echo $repo_path | tr "/" "_")
|
||||||
|
echo $servername
|
||||||
|
nvr -s --servername $servername "$@"
|
||||||
|
else
|
||||||
|
nvim "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
Loading…
Reference in a new issue