You are not logged in.
Something like
pacman -Qs "-ck"
pacman -Qs '-ck'
is always resulting in
error: invalid option: '--search' and '--changelog' may not be used together
IMHO, pacman should not parse the string as a command argument when the string is quoted, but use the whole thing as a search string.
Last edited by Soukyuu (2016-05-14 13:08:10)
[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]
Offline
Use
pacman -Qs '\-ck'
Offline
You can also use -- to signify that what follows shouldn't be treated as an option. e.g.
$ pacman -Sqs -libgl
error: invalid option: '--info' and '--list' may not be used together
$ pacman -Sqs -- -libgl
mesa-libgl
nvidia-304xx-libgl
nvidia-340xx-libgl
nvidia-libgl
bumblebee
lib32-libglade
lib32-libglvnd
lib32-mesa
lib32-mesa-libgl
lib32-nvidia-304xx-libgl
lib32-nvidia-340xx-libgl
lib32-nvidia-libgl
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Thanks, it's a bit counter-intuitive IMHO, but that works.
Use
pacman -Qs '\-ck'
-_-;;
I almost had it, then
pacman -Qs \-ck
[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]
Offline
Your shell interprets the quotes and they don't change anything in your examples -- pacman just sees -ck without the quotes. If you want to pass the quotes to pacman, you need to escape them, but pacman doesn't seem to handle that. The backslash also needs to be quoted for the shell (as in arojas example) or escaped:
pacman -Qs \\-ck
Offline
Using "--" is the standard way - it works for many commands.
Offline
I haven't seen that way being used, but I don't usually have to pass stuff starting with a dash. If you say it's a standard way to do it, then I just learned something new.
@Raynman: yes, it makes sense now.
[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]
Offline