Matt-FTW / dotfiles

💄 Yet another Aesthetic Hyprland Config
https://dotfiles-docs.vercel.app/
GNU General Public License v3.0
305 stars 21 forks source link

🐛 Bug: with command "sudo pacman -S" suggestions not showin correclty #34

Closed Ayanashi closed 1 week ago

Ayanashi commented 1 week ago

Did you check existing issues?

Description of the bug

little issue with suggestion on pacman -S but with yay -S show correcly already installed all packages and configs works done without any error output runnin on

Screenshots

sudo pacman -S captura-2024-11-27-1732737211 yay -S captura-2024-11-27-1732739319

Environment

Archlinux 6.12.1 kitty 0.37 fish version 3.7.1

Matt-FTW commented 1 week ago

Thats and issue related to the fzf.fish plugin. I'd recommend you to use yay instead of pacman anyway.

Ayanashi commented 4 days ago

Thats and issue related to the fzf.fish plugin. I'd recommend you to use yay instead of pacman anyway.

umh i use yay too but pacman also somethimes any tips for the configuration of fzf? maybe i need check out somethin in particular?

Matt-FTW commented 4 days ago

There's no need to use pacman with yay installed. You can create a pr with the fix for the fzf.fish plugin if you know where's the issue at, wait for a pr of another person or a fix from the developer itself.

Ayanashi commented 4 days ago

let me check, 'cause maybe i have two fzf package installed from patrick and yours and maybe this get some conflict..

Ayanashi commented 4 days ago

interesting the issue persist without fzf so this is very weird rn (edit).: let me check starship

Matt-FTW commented 4 days ago

Yeah, I have it as well with the autompletion engine of fish. Maybe there's an issue with the completion source file of pacman. I'd recommend to create a new issue over on the fish repo.

Ayanashi commented 4 days ago

with command 'complete --erase --command pacman' the issue is gone, anyway i create a new completition for pacman and added to fzf

function __fish_complete_pacman_packages
        pacman -Sl | awk '{print $2}' # Elenca i pacchetti disponibili
    end

    complete -c pacman -f -a "(__fish_complete_pacman_packages)" \
        -d "Pacman package names"

function __fish_complete_pacman_with_fzf
    pacman -Sl | fzf --preview 'pacman -Si {1}' | awk '{print $2}'
end

complete -c pacman -f -a "(__fish_complete_pacman_with_fzf)" \
    -d "Interactive search with fzf"

is not perfect anyway have some issue with autocompletion sometimes, what do you think some suggestions?

Ayanashi commented 4 days ago

another option is download the completitions from fish source for pacman with the command "curl -o ~/.config/fish/completions/pacman.fish https://raw.githubusercontent.com/fish-shell/fish-shell/master/share/completions/pacman.fish" and edit and config with fzf

Matt-FTW commented 1 day ago

I think this is better to have locally instead of upstream. I'll make sure to point out to your solution for anyone who wants to.