Adding the usage g completion-init fish | source when using Fish on Fedora results in this big list of errors when opening a new terminal:
warning: An error occurred while redirecting file '/usr/bin/chfn'
open: Permission denied
warning: An error occurred while redirecting file '/usr/bin/chsh'
open: Permission denied
warning: An error occurred while redirecting file '/usr/bin/lockdev'
open: Permission denied
warning: An error occurred while redirecting file '/usr/bin/sudo'
open: Permission denied
warning: An error occurred while redirecting file '/usr/bin/sudoedit'
open: Permission denied
warning: An error occurred while redirecting file '/usr/bin/sudoreplay'
open: Permission denied
warning: An error occurred while redirecting file '/usr/bin/userhelper'
open: Permission denied
warning: An error occurred while redirecting file '/bin/chfn'
open: Permission denied
warning: An error occurred while redirecting file '/bin/chsh'
open: Permission denied
warning: An error occurred while redirecting file '/bin/lockdev'
open: Permission denied
warning: An error occurred while redirecting file '/bin/sudo'
open: Permission denied
warning: An error occurred while redirecting file '/bin/sudoedit'
open: Permission denied
warning: An error occurred while redirecting file '/bin/sudoreplay'
open: Permission denied
warning: An error occurred while redirecting file '/bin/userhelper'
open: Permission denied
kalle@mycomputer ~> _
Debugging this shows that apparently Fedora sets permission 4111 (only execute, not readable) on some binaries
kalle@mycomputer ~> stat /bin/sudo
File: /bin/sudo
Size: 211088 Blocks: 416 IO Block: 4096 regular file
Device: 0,38 Inode: 307952 Links: 1
Access: (4111/---s--x--x) Uid: ( 0/ root) Gid: ( 0/ root)
Context: system_u:object_r:sudo_exec_t:s0
Access: 2026-06-15 22:19:35.578588221 +0200
Modify: 2026-04-14 02:00:00.000000000 +0200
Change: 2026-06-14 21:13:46.956617714 +0200
Birth: 2026-06-14 21:13:46.935617715 +0200
So in the completion script we need the test changed so it also checks for if the file is readable
|
test -f $file -a -x $file; or continue |
- test -f $file -a -x $file; or continue
+ test -f $file -a -x $file -a -r $file; or continue
This probably also needs to be changed in the completion-init for the other shells too. For Bash I think it should be changed here:
|
if [[ -n "$cmdpath" && -f "$cmdpath" ]]; then |
Adding the
usage g completion-init fish | sourcewhen using Fish on Fedora results in this big list of errors when opening a new terminal:Debugging this shows that apparently Fedora sets permission
4111(only execute, not readable) on some binariesSo in the completion script we need the
testchanged so it also checks for if the file is readableusage/lib/src/complete/fish.rs
Line 115 in d5734f0
This probably also needs to be changed in the completion-init for the other shells too. For Bash I think it should be changed here:
usage/lib/src/complete/bash.rs
Line 135 in d5734f0