From 3fe0b25b74b7f2a7dc661f77987d3a8640fc0476 Mon Sep 17 00:00:00 2001 From: Alex Pounds Date: Tue, 1 Sep 2015 22:04:58 -0400 Subject: [PATCH] Allow semicolons to be used in commit messages --- commands/expand/expand.go | 2 +- features/command_expand.feature | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/commands/expand/expand.go b/commands/expand/expand.go index 233adee..a75798f 100644 --- a/commands/expand/expand.go +++ b/commands/expand/expand.go @@ -50,7 +50,7 @@ Takes a list of digits (1 4 5) or numeric ranges (1-5) or even both.`, var expandArgDigitMatcher = regexp.MustCompile("^[0-9]{0,4}$") var expandArgRangeMatcher = regexp.MustCompile("^([0-9]+)-([0-9]+)$") -var shellEscaper = regexp.MustCompile("([\\^()\\[\\]<>' \"])") +var shellEscaper = regexp.MustCompile("([\\^()\\[\\]<>' \";])") // Process expands args and performs all substitution, etc. // diff --git a/features/command_expand.feature b/features/command_expand.feature index 71b6247..5a43a27 100644 --- a/features/command_expand.feature +++ b/features/command_expand.feature @@ -52,6 +52,17 @@ Feature: command expansion at command line | so(dumb).jpg | so\(dumb\).jpg | | hi mom.txt | hi\ mom.txt | | "x.txt | \"x.txt | + | wt;af.gif | wt\;af.gif | + + Scenario: Semicolons in commit messages + Given a git repository named "whatever" + And I cd to "whatever" + And a 4 byte file named "a.txt" + And I successfully run the following commands: + | git add a.txt | + When I successfully run `scmpuff expand -- git commit -m "foo; bar"` + Then the stderr should not contain anything + And the output should match /git\tcommit\t-m\tfoo\\;\\ bar/ Scenario: Allow user to specify --relative paths Given a directory named "foo"