From 149922cf6f09e3fc6309762a7c95951d7d846762 Mon Sep 17 00:00:00 2001 From: zeus Date: Tue, 28 Mar 2023 11:28:19 +0300 Subject: [PATCH] run nvim --- swl-nvim.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/swl-nvim.sh b/swl-nvim.sh index 27a2931..7774588 100755 --- a/swl-nvim.sh +++ b/swl-nvim.sh @@ -1,5 +1,12 @@ docker stop my-nvim-appl docker rm my-nvim-appl docker volume create my-nvim-volume -docker run -it -v my-nvim-volume:/root $(pwd):/root/appl --name my-nvim-appl mashmb/nvim:dev /bin/bash + +if [ $# -eq 0 ]; then + docker run -it -v my-nvim-volume:/root -v $(pwd):/root/appl --name my-nvim-appl hub.swarmlab.io:5443/nvim /bin/bash -c "nvim" +else + #echo "Arguments provided" + docker run -it -v my-nvim-volume:/root -v $(pwd):/root/appl --name my-nvim-appl hub.swarmlab.io:5443/nvim /bin/bash -c "nvim $1" +fi +