Closed sdadh01 closed 9 months ago
I cannot replicate this issue... and it can't really be explained because if your shell (bash) correctly interpreted the single-quoted string, it cannot possibly be interpreted as many separate arguments. Are you using a wrapper for hyfetch
?
Can you show me the output of which hyfetch
?
You're right - I should know better than to put in an issue after a long day of work...
This is purely an artifact of my wrapper script which I'm using for hyfetch as well as for neofetch because I was testing all this as a venv. What's happening is that my wrapper script is being run from the command line it has already interpreted and removed the single quotes so that when $ is used in the script they are not there - bash -x
shows what's going on (added ```echo $``` on the second [edit correct line] line for debug to show my mistake early!):
bash -x hyfetch --args 'colors=122 122 289 122 7 6'
+ echo --args colors=122 122 289 122 7 6
--args colors=122 122 289 122 7 6
+ cd /home/adh/Sync/src/hyfetch
+ . bin/activate
++ deactivate nondestructive
++ '[' -n '' ']'
++ '[' -n '' ']'
++ '[' -n /usr/bin/bash -o -n '' ']'
++ hash -r
++ '[' -n '' ']'
++ unset VIRTUAL_ENV
++ unset VIRTUAL_ENV_PROMPT
++ '[' '!' nondestructive = nondestructive ']'
++ VIRTUAL_ENV=/home/adh/Sync/src/hyfetch
++ export VIRTUAL_ENV
++ _OLD_VIRTUAL_PATH='/home/adh/bin:/home/adh/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/sbin:/sbin'
++ PATH='/home/adh/Sync/src/hyfetch/bin:/home/adh/bin:/home/adh/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/sbin:/sbin'
++ export PATH
++ '[' -n '' ']'
++ '[' -z '' ']'
++ _OLD_VIRTUAL_PS1=
++ PS1='(hyfetch) '
++ export PS1
++ VIRTUAL_ENV_PROMPT='(hyfetch) '
++ export VIRTUAL_ENV_PROMPT
++ '[' -n /usr/bin/bash -o -n '' ']'
++ hash -r
+ hyfetch --args colors=122 122 289 122 7 6
usage: hyfetch [-h] [-c] [-C CONFIG_FILE]
[-p {rainbow,transgender,nonbinary,agender,queer,genderfluid,bisexual,pansexual,polysexual,omnisexual,omniromantic,gay-men,lesbian,abrosexual,asexual,aromantic,aroace1,aroace2,aroace3,autosexual,intergender,greygender,akiosexual,bigender,demigender,demiboy,demigirl,transmasculine,transfeminine,genderfaun,demifaun,genderfae,demifae,neutrois,biromantic1,biromantic2,autoromantic,boyflux2,finsexual,unlabeled1,unlabeled2,pangender,gendernonconforming1,gendernonconforming2,femboy,tomboy,gynesexual,androsexual,gendervoid,voidgirl,voidboy,nonhuman-unity,beiyang,burger}]
[-m {8bit,rgb}] [-b {qwqfetch,neofetch,fastfetch,fastfetch-old}] [--args ARGS] [--c-scale SCALE] [--c-set-l LIGHT] [--c-overlay] [-V] [--june]
[--debug] [--distro DISTRO] [--ascii-file ASCII_FILE]
hyfetch: error: unrecognized arguments: 122 289 122 7 6
So, the call to the real hyfetch in the venv has no quotes from the wrapper - I'll fix my wrapper script. Sorry for the false alarm.
Describe the bug
The neofetch --colors arg takes multiple arguments as in :
neofetch --colors 122 122 289 122 7 6
The --args parameter only passes back the first value and then tries to parse the others as parameters to hyfetch instead of passing the whole thing back to the neofetch backend. hyfetch errors out with
hyfetch: error: unrecognized arguments: 122 289 122 7 6
which is all the color values except for the first.
Expected behavior
--args
passes all arguments back to neofetch unparsed so that neofetch gets all arguments between the single quotes as neofetch arguments.Screenshots
hyfetch attempting to use
--args 'colors 122 122 289 122 7 9'
to change the text colors (random coloring)HyFetch Error Screenshot
(you can see that hyfetch has eaten the first argument to --colors and tries to parse the remaining ones itself as hyfetch args)
neofetch expected result would be to change the colors as shown using all six values to --colors:
neofetch expected example
used neowofetch from hyfetch wrapped in the following script which I called neofetch for my own backward compatibility reasons:
Config file
Please paste the content of
~/.config/hyfetch.json
below:Additional context
No additional context