Skip to content
20 changes: 9 additions & 11 deletions Sources/Argument.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation


public enum Argument {
public enum Argument: Equatable {
case quoted(QuotedString)
case verbatim(String)

Expand All @@ -12,15 +12,6 @@ public enum Argument {
public init(verbatim string: String) {
self = .verbatim(string)
}

public var string: String {
switch self {
case let .quoted(value):
return value.quoted
case let .verbatim(string):
return string
}
}
}


Expand All @@ -32,7 +23,14 @@ extension Argument: ExpressibleByStringLiteral {


extension Argument: CustomStringConvertible {
public var description: String { string }
public var description: String {
switch self {
case let .quoted(value):
return value.quoted
case let .verbatim(string):
return string
}
}
}


Expand Down
2 changes: 1 addition & 1 deletion Sources/QuotedString.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ShellQuote


public struct QuotedString {
public struct QuotedString: Equatable {
public var unquoted: String
public var quoted: String

Expand Down
29 changes: 0 additions & 29 deletions Sources/SafeString.swift

This file was deleted.

Loading