Fish auto-complete is having trouble

Suppose I am in my home Directory, in terminal, and I want to visit the downloads folder, I type in "cd do" and press tab. I see documents folder and downloads folder below it suggested by auto-completion for the hint "cd do". I press tab another time and downloads folder is selected. I hit enter and I am in downloads folder.
The problem is with auto-completion here. When I press tab after typing "cd do", it should be replaced the string "cd do" by "cd documents" and next tab should replace it with " cd downloads". When I enter "cd do" and press tab, I see "cd doDocuments" on the next tab I see "cd doDownloads". I hit enter on "cd doDownloads" and it takes me to downloads directory.

In short, hint for auto completion suggestions on tab are not being overwritten by the suggested command. Rather the suggestion is being printed after that hint.

So cd Downloads looks like

cd doDownloads
It still works, but gets annoying.
Here I pressed tab after typing "do" . The string do should be REPLACED by Downloads or Documents. but they are are being printed AHEAD of the "do"

Similarly for exit, it is exexit
If tab pressed after ex

ththunar
If tab pressed after thun

Its not happening with directory auto-completion but with commands. Specifically the first two characters are repeated each time.
papacman
If tab pressed after pacm

Not a terminal problem
Tried reinstalling fish-autopair. Very confused. I remember updating Garuda fish config, later I remember removing neofetch from my fish configuration.

fish_update_completions does nothing.

Please suggest a fix.
Can share config.fish if asked for. Please help me. My terminal experience is ruined. :sob:

Probably your font cache is broken

Do this

fc-cache -fv

Also do

sudo fc-cache -fv

Then reboot

3 Likes

Sorry, no help.
Problem persisists. I think it is specific to Garuda fish config, fish, fish-autopair packages.

Even after copying fresh config.fish from /etc/skel/ it returns syntax error in the first line itself. There is an extra #.

Where can I get a new config.fish for Garuda? Any GitHub repo for it?

Why?

I do not use fish-autopair. And everything work fine.

Since you alone have this problem, it could also be you, right?

New error?
What is the output?

if you don't provide all relevant data here, all helpers are allowed to guess or what?

Read

please
and post

inxi -Fxxxza

as text!
Even if you personally think it is unnecessary.

2 Likes

But on removing fish-autopair,

checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing fish-autopair breaks dependency 'fish-autopair' required by garuda-fish-config

fish is having hard time recognizing lines which begin with '# ' (i.e comments) in config.fish

also when we suggest a hint and press tab for that hint to autocomplete, usually the hint is overwritten by a suggestion provided by the autocompleter. in my case the suggestion is printed after the hint
example-
if i enter 'fish_upda' and hit tab, fish makes it 'fish_update_completions' but for me it is 'fifish_update_completions' which works

OBSERVATION- only first 2 characters are showing this problem

 ╰─λ fifish_update_completions
Parsing man pages and writing completions to /home/hostuser/.local/share/fish/generated_completions/
  3659 / 3659 : zramctl.8.gz

i solved the issue with # by removing all the comments from config.fish

set fish_greeting
set VIRTUAL_ENV_DISABLE_PROMPT "1"
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"

set -U __done_min_cmd_duration 10000
set -U __done_notification_urgency_level low


source ~/.profile

if test -d ~/.local/bin
    if not contains -- ~/.local/bin $PATH
        set -p PATH ~/.local/bin
    end
end

if test -d ~/Applications/depot_tools
    if not contains -- ~/Applications/depot_tools $PATH
        set -p PATH ~/Applications/depot_tools
    end
end


if status --is-interactive
   source ("/usr/bin/starship" init fish --print-full-init | psub)
end


function __history_previous_command
  switch (commandline -t)
  case "!"
    commandline -t $history[1]; commandline -f repaint
  case "*"
    commandline -i !
  end
end

function __history_previous_command_arguments
  switch (commandline -t)
  case "!"
    commandline -t ""
    commandline -f history-token-search-backward
  case "*"
    commandline -i '$'
  end
end

if [ "$fish_key_bindings" = fish_vi_key_bindings ];
  bind -Minsert ! __history_previous_command
  bind -Minsert '$' __history_previous_command_arguments
else
  bind ! __history_previous_command
  bind '$' __history_previous_command_arguments
end

function history
    builtin history --show-time='%F %T '
end

function backup --argument filename
    cp $filename $filename.bak
end

function copy
    set count (count $argv | tr -d \n)
    if test "$count" = 2; and test -d "$argv[1]"
	set from (echo $argv[1] | trim-right /)
	set to (echo $argv[2])
        command cp -r $from $to
    else
        command cp $argv
    end
end

if type "wal" >> /dev/null 2>&1
   cat ~/.cache/wal/sequences
end

alias ls='exa -al --color=always --group-directories-first --icons' # preferred listing
alias la='exa -a --color=always --group-directories-first --icons'  # all files and dirs
alias ll='exa -l --color=always --group-directories-first --icons'  # long format
alias lt='exa -aT --color=always --group-directories-first --icons' # tree listing
alias l.="exa -a | egrep '^\.'"                                     # show only dotfiles

alias cat='bat --style header --style rules --style snip --style changes --style header'
[ ! -x /usr/bin/yay ] && [ -x /usr/bin/paru ] && alias yay='paru --bottomup'

alias aup="pamac upgrade --aur"
alias grubup="sudo update-grub"
alias fixpacman="sudo rm /var/lib/pacman/db.lck"
alias tarnow='tar -acf '
alias untar='tar -zxvf '
alias wget='wget -c '
alias rmpkg="sudo pacman -Rdd"
alias psmem='ps auxf | sort -nr -k 4'
alias psmem10='ps auxf | sort -nr -k 4 | head -10'
alias upd='sudo reflector --latest 5 --age 2 --fastest 5 --protocol https --sort rate --save /etc/pacman.d/mirrorlist && cat /etc/pacman.d/mirrorlist && sudo pacman -Syu && fish_update_completions && sudo updatedb'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ......='cd ../../../../..'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias hw='hwinfo --short'                                   # Hardware Info
alias big="expac -H M '%m\t%n' | sort -h | nl"              # Sort installed packages according to size in MB (expac must be installed)
alias gitpkg='pacman -Q | grep -i "\-git" | wc -l'			# List amount of -git packages

alias mirror="sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist" 
alias mirrord="sudo reflector --latest 50 --number 20 --sort delay --save /etc/pacman.d/mirrorlist" 
alias mirrors="sudo reflector --latest 50 --number 20 --sort score --save /etc/pacman.d/mirrorlist" 
alias mirrora="sudo reflector --latest 50 --number 20 --sort age --save /etc/pacman.d/mirrorlist" 

alias apt='man pacman'
alias apt-get='man pacman'
alias helpme='cht.sh --shell'
alias please='sudo'
alias tb='nc termbin.com 9999'

alias cleanup='sudo pacman -Rns (pacman -Qtdq)'

alias jctl="journalctl -p 3 -xb"

alias rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl"


 ╰─λ ininxi -Fxxxza

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_MEASUREMENT = "en_IN",
	LC_ADDRESS = "en_IN",
	LC_TELEPHONE = "en_IN",
	LC_TIME = "en_IN",
	LC_IDENTIFICATION = "en_IN",
	LC_NUMERIC = "en_IN",
	LC_PAPER = "en_IN",
	LC_NAME = "en_IN",
	LC_MONETARY = "en_IN",
	LANG = (unset)
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

System:    Kernel: 5.10.35-1-lts x86_64 bits: 64 compiler: gcc v: 10.2.0
           parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-lts root=UUID=9f1aeaa5-470f-4043-80db-a6285d36379e rw
           rootflags=subvol=@ cryptdevice=UUID=61943d89-e377-44ac-8a75-b8b776b2a841:luks-61943d89-e377-44ac-8a75-b8b776b2a841
           root=/dev/mapper/luks-61943d89-e377-44ac-8a75-b8b776b2a841 rd.udev.log_priority=3 vt.global_cursor_default=0
           systemd.unified_cgroup_hierarchy=1 resume=/dev/mapper/luks-0a3d92e7-e950-47a5-acdf-c8b9f11112a4 loglevel=3 quiet
           splash
           Desktop: Xfce 4.16.0 tk: Gtk 3.24.24 info: xfce4-panel, plank, vala-panel wm: xfwm4 vt: 7 dm: LightDM 1.30.0
           Distro: Garuda Linux base: Arch Linux
Machine:   Type: Laptop System: ASUSTeK product: ROG Strix G731GT_G731GT v: 1.0 serial: <filter>
           Mobo: ASUSTeK model: G731GT v: 1.0 serial: <filter> UEFI: American Megatrends v: G731GT.307 date: 04/28/2020
Battery:   ID-1: BAT0 charge: 13.7 Wh (34.7%) condition: 39.5/50.5 Wh (78.2%) volts: 12.5 min: 12.5
           model: ASUSTeK ASUS Battery type: Li-ion serial: N/A status: Discharging
CPU:       Info: 6-Core model: Intel Core i7-9750H bits: 64 type: MT MCP arch: Kaby Lake note: check family: 6
           model-id: 9E (158) stepping: D (13) microcode: DE cache: L2: 12 MiB
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 62399
           Speed: 999 MHz min/max: 800/4500 MHz Core speeds (MHz): 1: 999 2: 1000 3: 1039 4: 1000 5: 1008 6: 1003 7: 1019
           8: 1000 9: 991 10: 1000 11: 1000 12: 1000
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled
           Type: l1tf status: Not affected
           Type: mds status: Not affected
           Type: meltdown status: Not affected
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
           Type: spectre_v2 mitigation: Enhanced IBRS, IBPB: conditional, RSB filling
           Type: srbds mitigation: TSX disabled
           Type: tsx_async_abort status: Not affected
Graphics:  Device-1: Intel UHD Graphics 630 vendor: ASUSTeK driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:3e9b
           class-ID: 0300
           Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] vendor: ASUSTeK driver: nvidia v: 465.27
           alternate: nouveau,nvidia_drm bus-ID: 01:00.0 chip-ID: 10de:1f91 class-ID: 0300
           Display: x11 server: X.Org 1.20.11 driver: loaded: modesetting,nvidia display-ID: :0.0 screens: 1
           Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x286mm (20.0x11.3") s-diag: 583mm (23")
           Monitor-1: eDP-1-1 res: 1920x1080 dpi: 128 size: 382x215mm (15.0x8.5") diag: 438mm (17.3")
           OpenGL: renderer: NVIDIA GeForce GTX 1650/PCIe/SSE2 v: 4.6.0 NVIDIA 465.27 direct render: Yes
Audio:     Device-1: Intel Cannon Lake PCH cAVS vendor: ASUSTeK driver: snd_hda_intel v: kernel
           alternate: snd_soc_skl,snd_sof_pci bus-ID: 00:1f.3 chip-ID: 8086:a348 class-ID: 0403
           Sound Server-1: ALSA v: k5.10.35-1-lts running: yes
           Sound Server-2: JACK v: 0.125.0 running: no
           Sound Server-3: PulseAudio v: 14.2 running: no
           Sound Server-4: PipeWire v: 0.3.27 running: yes
Network:   Device-1: Intel Wireless-AC 9560 [Jefferson Peak] driver: iwlwifi v: kernel port: 5000 bus-ID: 00:14.3
           chip-ID: 8086:a370 class-ID: 0280
           IF: wlo1 state: up mac: <filter>
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK driver: r8169 v: kernel port: 3000
           bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200
           IF: eno2 state: down mac: <filter>
Bluetooth: Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB driver: btusb v: 0.8 bus-ID: 1-14:4
           chip-ID: 8087:0aaa class-ID: e001
           Report: bt-adapter ID: hci0 rfk-id: 1 state: up address: <filter>
Drives:    Local Storage: total: 476.94 GiB used: 16.19 GiB (3.4%)
           SMART Message: Required tool smartctl not installed. Check --recommends
           ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Micron model: 2200V MTFDHBA512TCK size: 476.94 GiB block-size:
           physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 rotation: SSD serial: <filter> rev: P1MA0V4 temp: 40.9 C
           scheme: GPT
Partition: ID-1: / raw-size: 459.65 GiB size: 459.65 GiB (100.00%) used: 16.19 GiB (3.5%) fs: btrfs dev: /dev/dm-0
           maj-min: 254:0 mapped: luks-61943d89-e377-44ac-8a75-b8b776b2a841
           ID-2: /boot/efi raw-size: 256 MiB size: 252 MiB (98.46%) used: 682 KiB (0.3%) fs: vfat dev: /dev/nvme0n1p1
           maj-min: 259:1
           ID-3: /home raw-size: 459.65 GiB size: 459.65 GiB (100.00%) used: 16.19 GiB (3.5%) fs: btrfs dev: /dev/dm-0
           maj-min: 254:0 mapped: luks-61943d89-e377-44ac-8a75-b8b776b2a841
           ID-4: /var/log raw-size: 459.65 GiB size: 459.65 GiB (100.00%) used: 16.19 GiB (3.5%) fs: btrfs dev: /dev/dm-0
           maj-min: 254:0 mapped: luks-61943d89-e377-44ac-8a75-b8b776b2a841
           ID-5: /var/tmp raw-size: 459.65 GiB size: 459.65 GiB (100.00%) used: 16.19 GiB (3.5%) fs: btrfs dev: /dev/dm-0
           maj-min: 254:0 mapped: luks-61943d89-e377-44ac-8a75-b8b776b2a841
Swap:      Kernel: swappiness: 10 (default 60) cache-pressure: 75 (default 100)
           ID-1: swap-1 type: partition size: 17.03 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/dm-1 maj-min: 254:1
           mapped: luks-0a3d92e7-e950-47a5-acdf-c8b9f11112a4
           ID-2: swap-2 type: zram size: 1.29 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram0
           ID-3: swap-3 type: zram size: 1.29 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram1
           ID-4: swap-4 type: zram size: 1.29 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram2
           ID-5: swap-5 type: zram size: 1.29 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram3
           ID-6: swap-6 type: zram size: 1.29 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram4
           ID-7: swap-7 type: zram size: 1.29 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram5
           ID-8: swap-8 type: zram size: 1.29 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram6
           ID-9: swap-9 type: zram size: 1.29 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram7
           ID-10: swap-10 type: zram size: 1.29 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram8
           ID-11: swap-11 type: zram size: 1.29 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram9
           ID-12: swap-12 type: zram size: 1.29 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram10
           ID-13: swap-13 type: zram size: 1.29 GiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram11
Sensors:   System Temperatures: cpu: 55.0 C mobo: N/A gpu: nvidia temp: 53 C
           Fan Speeds (RPM): cpu: 3600
Info:      Processes: 343 Uptime: 18m wakeups: 2 Memory: 15.49 GiB used: 2.55 GiB (16.4%) Init: systemd v: 248 tool: systemctl
           Compilers: gcc: 10.2.0 clang: 11.1.0 Packages: pacman: 1279 lib: 319 Shell: fish v: 3.2.1 running-in: kitty
           inxi: 3.3.04

YES, THATS ALL YOU ASKED FOR.
i use alacritty and kitty terminals. can share their dotfiles if you need it.

they can ask more data

Edit 1-
Monospace Font I am using is fira code retina
And I have removed neofetch and paleofetch from config.fish as the text part of neofetch was being rendered very far away from the logo.

More data

I was being misled by few people pointing BOM in my fish configuration

Apparently you have more problems than you realize.
If I were you, I would save my data, install everything with the latest ISO from yesterday and make no more changes to it!

2 Likes

If that was a problem everyone here would have issues with the default config. Im for example using it without issues.

λ cat ~/.config/fish/config.fish  
File: /home/nico/.config/fish/config.fish
## Set values
# Hide welcome message
set fish_greeting
set VIRTUAL_ENV_DISABLE_PROMPT "1"
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"

A possible next step for debugging would be to remove garuda-fish-config with all its dependencies and check if the issue happens without those as well. (just gotta make sure to install starship as the its needed for the config itself). This way you could verify if your claim is true.

To me this is not really a solution as we still dont know why its happening :eyes:

Its going to be too big a deal for me. Could you suggest a fix?

Did you read?

I reinstalled Garuda fish config some time ago. Problem not solved. I downloaded flagship gaming :dragon: iso. Just to copy the config.fish
No difference.

Yes I read. I know it's messed up. Is the problem unsolvable. I mean resetting locales or something like that. Don't worry I am not going to follow any random guide on web. You guys help me out. I request.

Thats not how things work in this forum. If you payed money for support you could demand help like this, not here though where people work in their precious free time because they enjoy doing this.

Anyway, I also wondered if the locale might be a problem. Does the problem happen as well in live boot with plain english locales?

I remember changing locale from en us to en india via Garuda system settings because I was familiar to it since I had used Manjaro xfce before. Now I am not able to change it back to en us. I recognise the issue now. The auto-completion works well with en us. Also live boots have no issue.

When I click the restore button, I am back to en india locale. When I right click on en us and click on option to set it as default it changed. But when I hit apply settings it's lost and I am back on en india locale

I think creating a new user might not work as locale is not different for each user.
Also reinstalling Garuda settings manager might be an option. Not sure.
Might change locale to something familiar like en uk?

I think it's not about Garuda configs or fish. Its about the garuda-settings-manager. This thread might be common for Garuda as well as Manjaro as both use the same app. I could head over there as well for help if you guys don't mind. I am not sure about relations of Garuda with other distros, all I know is endeavour os guys are not comfortable with us.Reinstalling will be my last resort. Till then I want to make all attempts to change my locale to enUS. Can I post the same issue on Manjaro forum after all the helpers over here have done trying out? They also can help with locale as Garuda and Manjaro's system settings manager are very similar. I wait for a Garuda team member for answer over this.

Thanks

Some help I found on web

https://wiki.manjaro.org/index.php/Locale

Maybe changing locale directly from the file might help. Possibly garuda-settings-manager needs to be temporarily removed in the process

Then I can update grub, makeinitpcio -P, reinstall kernel and reinstall garuda-settings-manager

I am pretty sure the support staff on the Manjaro forum will not be impressed by a user from Garuda asking for help on their forum.

That pretty much goes for every Arch based distro (especially the Arch forum).

3 Likes

I understand. But I desperately need help. I have done everything I can. even sudo locale-gen is giving me an error. Can anyone help me? Where do I go? Am I abandoned? Any place where I could get help?:sob::sob::sob:

Try reddit if you're desperate. :smiley:

I use bash, so I have no suggestions to offer.

1 Like

Does that mean there is no hope of getting help here? I am ready to fully co-operate with anyone, in case you have free time. Please help me if you can, would be great.

This isn't Telegram or live chat. This is a forum where it may take days to find the right person to help you find an answer. Have a little patience for crying out loud.

If you are expecting instantaneous real time support just for you, perhaps we can set up a per minute paid support account for you if you are expecting that level of attention.

I believe M$ charges a minimum of $160US per support incident. How would you like to pay per minute or per incident? :rofl:

Edit:

Just by happenstance I was reading another post just now where a user was begging for help and being extremely impatient after already receiving help:

Guess what, turns out that user was you (yet again).

Your behaviour is not only rude, it is out of line for a volunteer support forum. It is already understood that you are looking for help if you have opened a help request on the forum. Repeatedly begging for help is unwarranted and unwelcome here. If I see one more example of this type of behavior from you you will be silenced on our forum for at least 2 weeks.

Learn some etiquette or go elsewhere for your support needs.

3 Likes

This post panicked hell out of me. I am sorry for the rude behaviour. Will wait for a week or two over here. Let's see how it turns out.
Thanks and sorry.