View previous topic :: View next topic |
Author |
Message |
spikyatlinux n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
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 |
|
![](templates/gentoo/images/spacer.gif) |
Banana Moderator
![Moderator Moderator](/images/ranks/rank-mod.gif)
![](images/avatars/5204386264b863c6da7ffb.jpg)
Joined: 21 May 2004 Posts: 1621 Location: Germany
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
logrusx Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/176594205966916859b5145.jpg)
Joined: 22 Feb 2018 Posts: 2164
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Zucca Moderator
![Moderator Moderator](/images/ranks/rank-mod.gif)
![](images/avatars/1241878214609aa5b503437.gif)
Joined: 14 Jun 2007 Posts: 3606 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 :..
Gentoo IRC channels reside on Libera.Chat.
--
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 |
|
![](templates/gentoo/images/spacer.gif) |
Genone Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/21004157514287ab2b29021.jpg)
Joined: 14 Mar 2003 Posts: 9592 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 |
|
![](templates/gentoo/images/spacer.gif) |
spikyatlinux n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
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. ![Idea :idea:](images/smiles/icon_idea.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Hu Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
Joined: 06 Mar 2007 Posts: 22378
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
spikyatlinux n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
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 |
|
![](templates/gentoo/images/spacer.gif) |
logrusx Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/176594205966916859b5145.jpg)
Joined: 22 Feb 2018 Posts: 2164
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
spikyatlinux n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
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 |
|
![](templates/gentoo/images/spacer.gif) |
spikyatlinux n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
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 |
|
![](templates/gentoo/images/spacer.gif) |
|