bash-completion-tutorial icon indicating copy to clipboard operation
bash-completion-tutorial copied to clipboard

different result in COMPREPLY=($(compgen -W "$(fc -l -50 | sed 's/\t//')" -- "${COMP_WORDS[1]}"))

Open georgemarselis-nvi opened this issue 8 months ago • 0 comments

Καλησπέρα κ. Λαζαρίδη,

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:

Image

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.

georgemarselis-nvi avatar Apr 02 '25 20:04 georgemarselis-nvi