Skip to content

Commit dd09677

Browse files
committed
Minor bug fixes.
1 parent e657d24 commit dd09677

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.3.4 (2021-05-12)
4+
- Minor bug fixes
5+
- Migrated project to Xcode 12.5
6+
37
## 0.3.3 (2020-10-04)
48
- Ported code to Swift 5.3
59
- Migrated project to Xcode 12.0

Sources/CommandLineKit/Info.plist

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>0.3.3</string>
18+
<string>0.3.4</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSHumanReadableCopyright</key>
22-
<string>Copyright © 2018-2020 Google LLC</string>
22+
<string>Copyright © 2018-2021 Google LLC</string>
2323
<key>NSPrincipalClass</key>
2424
<string></string>
2525
</dict>

Sources/CommandLineKit/LineReader.swift

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// CommandLineKit
44
//
55
// Created by Matthias Zenger on 07/04/2018.
6-
// Copyright © 2018-2019 Google LLC
6+
// Copyright © 2018-2021 Google LLC
77
// Copyright © 2017 Andy Best <andybest.net at gmail dot com>
88
// Copyright © 2010-2014 Salvatore Sanfilippo <antirez at gmail dot com>
99
// Copyright © 2010-2013 Pieter Noordhuis <pcnoordhuis at gmail dot com>
@@ -95,6 +95,12 @@ public class LineReader {
9595
}
9696

9797
public static func supportedBy(terminal: String) -> Bool {
98+
#if os(macOS)
99+
if let xpcServiceName = ProcessInfo.processInfo.environment["XPC_SERVICE_NAME"],
100+
xpcServiceName.localizedCaseInsensitiveContains("com.apple.dt.xcode") {
101+
return false
102+
}
103+
#endif
98104
switch terminal {
99105
case "", "xcode", "dumb", "cons25", "emacs":
100106
return false

Sources/CommandLineKit/LineReaderHistory.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// CommandLineKit
44
//
55
// Created by Matthias Zenger on 07/04/2018.
6-
// Copyright © 2018-2019 Google LLC
6+
// Copyright © 2018-2021 Google LLC
77
// Copyright © 2017 Andy Best <andybest.net at gmail dot com>
88
// Copyright © 2010-2014 Salvatore Sanfilippo <antirez at gmail dot com>
99
// Copyright © 2010-2013 Pieter Noordhuis <pcnoordhuis at gmail dot com>
@@ -67,6 +67,7 @@ class LineReaderHistory {
6767
// Don't add a duplicate if the last item is equal to this one
6868
if let lastItem = history.last {
6969
if lastItem == item {
70+
index = history.endIndex
7071
return
7172
}
7273
}

Tests/CommandLineKitTests/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>BNDL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>0.3.3</string>
18+
<string>0.3.4</string>
1919
<key>CFBundleVersion</key>
2020
<string>1</string>
2121
</dict>

0 commit comments

Comments
 (0)