The CLI cot doesn't open a file which is already exists.
Environment and steps to reproduce
mac 10.12.3 (Sierra)
python 3.5.1
cot 2.5.0
open terminal.app.
enter commands below.
echo "test file" > test.txt
cot test.txt
Result
Mac just focused to CotEditor but it doesn't open the test.txt file.
Expected result
Mac focused to CotEditor and open the file.
Discussion
In the python script cot, args.files which holds full path to given files is used in some for loops. The function map() returns map object which can be iterated just once. So I propose a solution like below.
Description
The CLI cot doesn't open a file which is already exists.
Environment and steps to reproduce
mac 10.12.3 (Sierra) python 3.5.1 cot 2.5.0
Result
Mac just focused to CotEditor but it doesn't open the
test.txt
file.Expected result
Mac focused to CotEditor and open the file.
Discussion
In the python script
cot
, args.files which holds full path to given files is used in some for loops. The functionmap()
returns map object which can be iterated just once. So I propose a solution like below.