From 421bb38958fc5a628480764d1b6148a0763f5c4e Mon Sep 17 00:00:00 2001 From: Matt McClure Date: Sun, 11 Sep 2016 10:57:00 -0400 Subject: [PATCH] Fix defect when box name is substring of another Match name exactly by guarding it with leading `/` and trailing `$`. --- bin/vagrant-tramp-ssh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/vagrant-tramp-ssh b/bin/vagrant-tramp-ssh index 86e9ee9..a36d47a 100755 --- a/bin/vagrant-tramp-ssh +++ b/bin/vagrant-tramp-ssh @@ -38,7 +38,7 @@ read id dir <<<\ | cut -d, -f5- \ | awk -v RS="" \ -v name="$name" \ - -v dir="$dir_name" \ + -v dir="/$dir_name$" \ "\$2==name && \$5~dir { print \$1; print \$5 }") cd "$dir"