File tree 4 files changed +19
-4
lines changed
src/PHPCR/Shell/Subscriber
4 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 8
8
9
9
- ` session:export:view ` : Added ` --pretty ` option to ` session:export:view ` command to output formatted XML.
10
10
- ` 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 32
32
<sv : property sv : name =" jcr:mixinTypes" sv : type =" name" >
33
33
<sv : value >mix:shareable</sv : value >
34
34
</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 >
35
40
<sv : node sv : name =" article1" >
36
41
<sv : property sv : name =" jcr:primaryType" sv : type =" Name" >
37
42
<sv : value >nt:unstructured</sv : value >
Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ Feature: Command aliases
7
7
Given that I am logged in as "testuser"
8
8
And the "cms.xml" fixtures are loaded
9
9
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
+
10
15
Scenario Outline : Execute an alias
11
16
Given I execute the "<command>" command
12
17
Then the command should not fail
@@ -20,16 +25,14 @@ Feature: Command aliases
20
25
| mv cms smc |
21
26
| ls |
22
27
| ls cms |
23
- | sl cms /articles cms /test /foobar |
28
+ | ln cms /articles cms /test /foobar |
24
29
| cat cms /articles /article1 /title |
25
30
31
+
26
32
Scenario : List aliases
27
33
Given I execute the "shell:alias:list" command
28
34
Then the command should not fail
29
35
And I should see a table containing the following rows:
30
36
| Alias | Command |
31
37
| cd | shell :path :change {arg1 } |
32
38
| 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)
72
72
$ tokens = $ input ->getTokens ();
73
73
74
74
foreach ($ tokens as $ i => $ token ) {
75
+ if (strstr ($ token , ' ' )) {
76
+ $ token = escapeshellarg ($ token );
77
+ }
75
78
$ replaces ['{arg ' . $ i . '} ' ] = $ token ;
76
79
}
77
80
You can’t perform that action at this time.
0 commit comments