Smooth some rough edges
jamesaoverton opened this issue · 3 comments
I used cogs connect
to connect to an existing Google Sheet with a "prefix" sheet. That was fine. Then I wanted to add that file to tests/prefix.tsv
, but it was harder than I expected:
$ cogs add tests/prefix.tsv -t prefix
CRITICAL: 'tests/prefix.tsv' is neither an existing path nor an ignored sheet
$ cogs add prefix
CRITICAL: 'prefix' is neither an existing path nor an ignored sheet
$ cogs fetch
$ cogs add prefix
$ ls prefix.tsv
ls: cannot access 'prefix.tsv': No such file or directory
$ cogs pull
$ ls prefix.tsv
prefix.tsv
$ cogs mv prefix.tsv tests/
prefix.tsv and tests/ both exist - 'mv' will overwrite the contents of tests/.
Do you wish to proceed? [y/n] n
$ cogs mv prefix.tsv tests/prefix.tsv
$ ls tests/
prefix.tsv
I think a few things would have made this much easier:
cogs connect
should run fetchcogs add tests/prefix.tsv -t prefix
should just work- maybe since
tests/prefix.tsv
doesn't exist locallycogs add
should fetch it cogs mv prefix.tsv tests/
should see thattests/
is a directory and move the file into it rather than overwriting
When you say fetch
, do you mean pull
? If we just fetch
, there will be no local copies, only the remote tracked copies in the .cogs
directory.
Currently cogs connect
does not know about tracked or ignored sheets, so you can’t cogs add
as I expected, until you run cogs fetch
.
OK - that makes sense to me. Number 3, I think, we should hold off on. Maybe just add to the docs that you should fetch
or pull
after adding an ignored sheet, just in case the user doesn't want to fetch everything for some reason.