File tree Expand file tree Collapse file tree 2 files changed +35
-35
lines changed Expand file tree Collapse file tree 2 files changed +35
-35
lines changed Original file line number Diff line number Diff line change @@ -91,41 +91,6 @@ import Algorithms
91
91
)
92
92
}
93
93
94
- /// Structure used to pre-define commands for use with ShellOut
95
- public struct ShellOutCommand {
96
- /// The string that makes up the command that should be run on the command line
97
- public var command : String
98
-
99
- public var arguments : [ String ]
100
-
101
- /// Initialize a value using a string that makes up the underlying command
102
- public init ( command: String , arguments: [ String ] = [ ] ) {
103
- self . command = command
104
- self . arguments = arguments
105
- }
106
-
107
- public func appending( arguments newArguments: [ String ] ) -> Self {
108
- . init( command: command, arguments: arguments + newArguments)
109
- }
110
-
111
- public func appending( argument: String ) -> Self {
112
- appending ( arguments: [ argument] )
113
- }
114
-
115
- public mutating func append( arguments newArguments: [ String ] ) {
116
- self . arguments = self . arguments + newArguments
117
- }
118
-
119
- public mutating func append( argument: String ) {
120
- append ( arguments: [ argument] )
121
- }
122
- }
123
-
124
- extension ShellOutCommand : CustomStringConvertible {
125
- public var description : String {
126
- ( [ command] + arguments) . joined ( separator: " " )
127
- }
128
- }
129
94
130
95
public extension ShellOutCommand {
131
96
static func bash( arguments: [ Argument ] ) -> Self {
Original file line number Diff line number Diff line change
1
+ /// Structure used to pre-define commands for use with ShellOut
2
+ public struct ShellOutCommand {
3
+ /// The string that makes up the command that should be run on the command line
4
+ public var command : String
5
+
6
+ public var arguments : [ String ]
7
+
8
+ /// Initialize a value using a string that makes up the underlying command
9
+ public init ( command: String , arguments: [ String ] = [ ] ) {
10
+ self . command = command
11
+ self . arguments = arguments
12
+ }
13
+
14
+ public func appending( arguments newArguments: [ String ] ) -> Self {
15
+ . init( command: command, arguments: arguments + newArguments)
16
+ }
17
+
18
+ public func appending( argument: String ) -> Self {
19
+ appending ( arguments: [ argument] )
20
+ }
21
+
22
+ public mutating func append( arguments newArguments: [ String ] ) {
23
+ self . arguments = self . arguments + newArguments
24
+ }
25
+
26
+ public mutating func append( argument: String ) {
27
+ append ( arguments: [ argument] )
28
+ }
29
+ }
30
+
31
+ extension ShellOutCommand : CustomStringConvertible {
32
+ public var description : String {
33
+ ( [ command] + arguments) . joined ( separator: " " )
34
+ }
35
+ }
You can’t perform that action at this time.
0 commit comments