File tree Expand file tree Collapse file tree 4 files changed +19
-4
lines changed
src/PHPCR/Shell/Subscriber Expand file tree Collapse file tree 4 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 88
99- ` session:export:view ` : Added ` --pretty ` option to ` session:export:view ` command to output formatted XML.
1010- ` session:export:view ` : Ask confirmation before overwriting file.
11+
12+ ## Bug Fixes
13+
14+ - Aliases: Allow quoted arguments
Original file line number Diff line number Diff line change 3232 <sv : property sv : name =" jcr:mixinTypes" sv : type =" name" >
3333 <sv : value >mix:shareable</sv : value >
3434 </sv : property >
35+ <sv : node sv : name =" Title with Spaces" >
36+ <sv : property sv : name =" jcr:primaryType" sv : type =" Name" >
37+ <sv : value >nt:unstructured</sv : value >
38+ </sv : property >
39+ </sv : node >
3540 <sv : node sv : name =" article1" >
3641 <sv : property sv : name =" jcr:primaryType" sv : type =" Name" >
3742 <sv : value >nt:unstructured</sv : value >
Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ Feature: Command aliases
77 Given that I am logged in as "testuser"
88 And the "cms.xml" fixtures are loaded
99
10+ Scenario : Execute an alias with a quoted string
11+ Given I execute the "ls 'cms/articles/Title with Spaces'" command
12+ Then the command should not fail
13+
14+
1015 Scenario Outline : Execute an alias
1116 Given I execute the "<command>" command
1217 Then the command should not fail
@@ -20,16 +25,14 @@ Feature: Command aliases
2025 | mv cms smc |
2126 | ls |
2227 | ls cms |
23- | sl cms /articles cms /test /foobar |
28+ | ln cms /articles cms /test /foobar |
2429 | cat cms /articles /article1 /title |
2530
31+
2632 Scenario : List aliases
2733 Given I execute the "shell:alias:list" command
2834 Then the command should not fail
2935 And I should see a table containing the following rows:
3036 | Alias | Command |
3137 | cd | shell :path :change {arg1 } |
3238 | ls | node :list {arg1 } |
33-
34-
35-
Original file line number Diff line number Diff line change @@ -72,6 +72,9 @@ public function handleAlias(CommandPreRunEvent $event)
7272 $ tokens = $ input ->getTokens ();
7373
7474 foreach ($ tokens as $ i => $ token ) {
75+ if (strstr ($ token , ' ' )) {
76+ $ token = escapeshellarg ($ token );
77+ }
7578 $ replaces ['{arg ' . $ i . '} ' ] = $ token ;
7679 }
7780
You can’t perform that action at this time.
0 commit comments