bash-completion-tutorial
bash-completion-tutorial copied to clipboard
different result in COMPREPLY=($(compgen -W "$(fc -l -50 | sed 's/\t//')" -- "${COMP_WORDS[1]}"))
Καλησπέρα κ. Λαζαρίδη,
I am going through your tutorial for bash completion. In the step for
COMPREPLY=($(compgen -W "$(fc -l -50 | sed 's/\t//')" -- "${COMP_WORDS[1]}"))
I get a different result than you:
numbers first, commands later. Also, please note, I am getting 113 possibilities back.
Here are the contents for history size and control I have set in BASH
# for bash 4.5 and above export HISTSIZE=-1 export HISTFILESIZE=-1 export HISTCONTROL="ignorespace:erasedups" export HISTTIMEFORMAT='%F %T ' export HISTIGNORE="history:" export PROMPT_COMMAND='history -a'
I was wondering why am I seeing such different results. If it matters, I'm on Fedora 41.
Thank you very much for your time.