From efeebe39f05da4c28c7d8a1ebfa1d97fa97b959d Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Wed, 9 May 2018 16:45:41 +0100 Subject: [PATCH] Make i3-shell script work if there is spaces in the name of directory --- bin/i3-shell | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/i3-shell b/bin/i3-shell index e63980c5..a46c0ce1 100755 --- a/bin/i3-shell +++ b/bin/i3-shell @@ -1,7 +1,7 @@ #!/bin/bash # i3 thread: https://faq.i3wm.org/question/150/how-to-launch-a-terminal-from-here/?answer=152#post-id-152 -# I stole this from here: https://gist.github.com/viking/5851049 +# I stole this from here: https://gist.github.com/viking/5851049 and modified it slightly CMD=$TERMINAL CWD='' @@ -23,7 +23,7 @@ if [ -n "$PID" ]; then fi fi if [ -n "$CWD" ]; then - cd $CWD && $CMD + cd "$CWD" && $CMD else $CMD fi