Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to list by link and backlink #254

Closed
mhanberg opened this issue Sep 12, 2022 · 4 comments · Fixed by #255
Closed

Unable to list by link and backlink #254

mhanberg opened this issue Sep 12, 2022 · 4 comments · Fixed by #255
Labels
bug Something isn't working

Comments

@mhanberg
Copy link
Contributor

Description

I am attempting to find all notes that are linked by or backlinked to a given note, but I am receiving the following error

┌─ 03:43:25 PM
│iCloud/notes/work
└─  zk list --link-to=azcb.md --linked-by=azcb.md
zk: error: ambiguous column name: l.snippet

Should this work?

@mickael-menu
Copy link
Member

Thank you, it should be fixed in main.

@mhanberg
Copy link
Contributor Author

Thanks, I appreciate it. I'll try again on monday.

@mhanberg
Copy link
Contributor Author

Tried this out.

I expected this to be an "OR" operation, in that it would show me notes that are linking to the specified note, as well as notes that are linked by the specified note.

But it seems to be doing an "AND" operation, only returning notes that satisfy both conditions.

Is that expected?

@mickael-menu
Copy link
Member

Yes that's expected, the CLI flags are additive (although I agree that for these two flags it might be less useful). You could add an alias like this to do two different queries:

anylink = "zk list -q --linked-by $@ && zk list -q --link-to $@"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants