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

qblist in -c with --jqselect #4

Open
MS-design-ui opened this issue Mar 21, 2022 · 1 comment
Open

qblist in -c with --jqselect #4

MS-design-ui opened this issue Mar 21, 2022 · 1 comment

Comments

@MS-design-ui
Copy link

Hi!

Loving this tool and am wanting to incorporate it more in my automation scripts.

I'm having an issue when passing a hash through in subshell mode.

When running the below command in interactive mode (no -c) it works
qblist -r --jqselect '(.hash=="EXAMPLE_HASH")'
The output is as expected.

When running in subshell mode, it works without --jqselect (Note I have removed login info which includes the URL.)
qbc .... -c "qblist -r --jqselect '(.hash=="EXAMPLE_HASH")'"
It prints nothing.

When running without the --jqselect
qbc .... -c "qblist -r"

It prints all torrents in order.

Is there a way to --jqselect by hash in subshell mode?

@hrap1919
Copy link
Owner

hrap1919 commented Apr 1, 2022

Thanks for the feedback!

Usually such kind of problems can be easily solved by symbol screening:
qbc .... -c "qblist -r --jqselect '(.hash==\"EXAMPLE_HASH\")'"

Alternatively (since qbc is an extended bash interpreter), for scripting you can put
qblist -r --jqselect '(.hash=="EXAMPLE_HASH")'
into script.txt and run
qbc .... script.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants