Skip to content

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

@georgemarselis-nvi

Description

@georgemarselis-nvi

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions