View previous topic :: View next topic |
Author |
Message |
spikyatlinux n00b
Joined: 18 Sep 2010 Posts: 38
|
Posted: Mon May 20, 2024 7:24 pm Post subject: Rewrite yayfzf from arch for portage |
|
|
Hey,
I´ve one perhaps stupid question.
Is somebody interested in rewriting https://github.com/ConnerWill/yayfzf (yayfzf is an AUR package fzf finder to search, install, remove, and manage packages using yay ) for portage? I´ve tried, but it wasn´t usable.
Best regards |
|
Back to top |
|
|
Banana Moderator
Joined: 21 May 2004 Posts: 1721 Location: Germany
|
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2407
|
Posted: Tue May 21, 2024 9:37 am Post subject: Re: Rewrite yayfzf from arch for portage |
|
|
spikyatlinux wrote: | Hey,
I´ve one perhaps stupid question.
Is somebody interested in rewriting https://github.com/ConnerWill/yayfzf (yayfzf is an AUR package fzf finder to search, install, remove, and manage packages using yay ) for portage? I´ve tried, but it wasn´t usable.
Best regards |
What's the specific desired functionality you don't find in Gentoo?
Best Regards,
Georgi |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3688 Location: Rasi, Finland
|
Posted: Tue May 21, 2024 10:23 am Post subject: --fuzzy-search |
|
|
At least you can have fuzzy search: man emerge: | --fuzzy-search [ y | n ]
Enable or disable fuzzy search for search
actions. When fuzzy search is enabled, a
result is returned if it is sufficiently
similar to the search string, without re‐
quiring an exact match. This option is en‐
abled by default. Fuzzy search does not
support regular expressions, therefore it
is automatically disabled for regular ex‐
pression searches. Fuzzy search is slightly
slower than non-fuzzy search. | ... but personally I've always used qsearch and when needed the pipe its output to some parser like grep.
BTW ... Is there a fuzzy-grep?
... There was something like it: agrep _________________ ..: Zucca :..
My gentoo installs: | init=/sbin/openrc-init
-systemd -logind -elogind seatd |
Quote: | I am NaN! I am a man! |
Last edited by Zucca on Tue May 21, 2024 10:29 am; edited 1 time in total |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9608 Location: beyond the rim
|
Posted: Tue May 21, 2024 10:25 am Post subject: Re: Rewrite yayfzf from arch for portage |
|
|
Doesn't really make sense to rewrite a wrapper script that is specifically crafted for those two package management tools, as most of the actual functionality comes from those. |
|
Back to top |
|
|
spikyatlinux n00b
Joined: 18 Sep 2010 Posts: 38
|
Posted: Tue May 21, 2024 11:56 am Post subject: Re: Rewrite yayfzf from arch for portage |
|
|
logrusx wrote: | spikyatlinux wrote: | Hey,
I´ve one perhaps stupid question.
Is somebody interested in rewriting https://github.com/ConnerWill/yayfzf (yayfzf is an AUR package fzf finder to search, install, remove, and manage packages using yay ) for portage? I´ve tried, but it wasn´t usable.
Best regards |
What's the specific desired functionality you don't find in Gentoo?
Best Regards,
Georgi |
Nothing special, it would be nice to have it in my i3wm environment .
I thought someone is able to rewrite the yay commands easily
Thanks for answering, i try it at home tonight. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22626
|
Posted: Tue May 21, 2024 2:17 pm Post subject: |
|
|
Are you asking for a command you can run on Gentoo that searches the AUR repository or are you asking for a command that searches Gentoo's Portage tree, and provides an interface that a user of yayfzf would find familiar? |
|
Back to top |
|
|
spikyatlinux n00b
Joined: 18 Sep 2010 Posts: 38
|
Posted: Tue May 21, 2024 3:30 pm Post subject: |
|
|
Hey Hu,
no I will use it on my gentoo machine, if I change Line 294
Code: | --preview 'cat <(yay -Si {1}) <(yay -Fl {1} | awk "{print \$2}")' \ | to Code: | --preview 'cat <(eix {1}) <(qlist {1} | awk "{print \$2}")' \ |
and line Code: | yay \
-Ss "${SearchInput}" \
--singlelineresults \
--color "${COLOR_WHEN}" \
--bottomup 2>/dev/null |
grep \ | to Code: | eix \
--compact "${SearchInput}" \
--only-names \
--color "${COLOR_WHEN}" 2>/dev/null |
grep \ | I have usable portage browser with intergrated eix search (I think it´s faster than qsearch), but I want to translate the arch commands to gentoo machine for using it with eix,qsearch,qlist,emaint,emerge or whatever. |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2407
|
Posted: Tue May 21, 2024 5:31 pm Post subject: |
|
|
spikyatlinux wrote: | but I want to translate the arch commands to gentoo machine for using it with eix,qsearch,qlist,emaint,emerge or whatever. |
Sounds like a good fun exercise. One thing you can do is share it or share problematic snippets and ask people to help you with the particular issues you experience.
Best Regards,
Georgi |
|
Back to top |
|
|
spikyatlinux n00b
Joined: 18 Sep 2010 Posts: 38
|
Posted: Wed May 22, 2024 12:35 pm Post subject: |
|
|
I´ve tried to rewrite something, it´s partially working, search via regex ctrl+i to select and ctrl+x to install.
Rewrite yayfzf to pwrfzf (portage wrapper) for naming confusion
Problems are:
- Selected multiple pkgs, ctrl+x only want to install one pkg
- Start at bottom and not first line
- Used sudo (Later will change to doas, or do a root check, I don´t know)
I´ve uploaded code to https://github.com/spikyatlinux/pwrfzf.git, feel free to help |
|
Back to top |
|
|
spikyatlinux n00b
Joined: 18 Sep 2010 Posts: 38
|
Posted: Sun Aug 04, 2024 3:49 pm Post subject: |
|
|
spikyatlinux wrote: | I´ve tried to rewrite something, it´s partially working, search via regex ctrl+i to select and ctrl+x to install.
Rewrite yayfzf to pwrfzf (portage wrapper) for naming confusion
Problems are:
- Selected multiple pkgs, ctrl+x only want to install one pkg
- Start at bottom and not first line
- Used sudo (Later will change to doas, or do a root check, I don´t know)
I´ve uploaded code to https://github.com/spikyatlinux/pwrfzf.git, feel free to help |
I´ve rewritten the script, now it works in my case.
- ctrl-i add package to install list
- ctrl-r remove selected package, only highlighted line
- ctrl-w update world (runs emaint sync -a && emerge -1auvDN @world)
It´s not perfect but works. |
|
Back to top |
|
|
|