Skip to content
This repository was archived by the owner on Dec 14, 2024. It is now read-only.

Commit 93af4c2

Browse files
committed
Ignore piped text if file is specified (fix #17)
1 parent a00f181 commit 93af4c2

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
Change Log
33
==========================
44

5+
2.11.0
6+
--------------------------
7+
8+
- Ignore piped text if a file to open is specified.
9+
10+
511
2.10.0
612
--------------------------
713

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ The command-line helper tool for [CotEditor](https://coteditor.com).
99

1010
License
1111
-----------------------------
12-
© 2015-2023 1024jp.
12+
© 2015-2024 1024jp.
1313

1414
The source code is distributed under the terms of the __Apache License, Version 2.0__. See the [LICENSE](LICENSE) for details.

cot

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Created by 1024jp on 2015-08-12.
99
1010
------------------------------------------------------------------------------
1111
12-
© 2015-2023 1024jp
12+
© 2015-2024 1024jp
1313
1414
Licensed under the Apache License, Version 2.0 (the "License");
1515
you may not use this file except in compliance with the License.
@@ -377,7 +377,7 @@ if __name__ == "__main__":
377377
args = parse_args()
378378

379379
# read piped text if exists
380-
if sys.stdin.isatty():
380+
if args.files or sys.stdin.isatty():
381381
stdin = None
382382
else:
383383
stdin = ''.join(sys.stdin)

0 commit comments

Comments
 (0)