On 12/6/24 12:12 AM, Frederick Abell wrote:
Bash Version: 5.2 Patch Level: 37 Release Status: releaseDescription: `compete -f`/`complete -A file` do not work at all, whilst `complete -d`/`complete -A directory` work fine. Someone from 2008 appears to have the same issue: https://www.linuxquestions.org/questions/linux-software-2/bash-completion-complete-f-not-working-635918/ I also tested this on a recent version of Debian stable, with the same results. Thank you for your time. Repeat-By: $ bash --norc # irrelevant $ ls /etc/inputrc $HOME/.inputrc # irrelevant ls: cannot access '/etc/inputrc': No such file or directory ls: cannot access '/home/fkabell/.inputrc': No such file or directory $ pacman -Q readline readline 8.2.013-1 $ mkdir a_dir b_dir $ touch c_file d_file $ ls -F a_dir/ b_dir/ c_file d_file $ complete -d cd # works fine $ cd <tab> a_dir/ b_dir/ $ complete -f cat # does not work $ cat <tab> a_dir/ b_dir/ c_file d_file # I was expecting to only see c_file and d_file.
`complete -f' is basically the same as readline's filename completion, which includes directories in the list of possible completions because filenames can appear in subdirectories of the current directory, and readline allows you to build up a pathname by completing one component at a time. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature