0

I've got a function defined in my fish shell:

function cl --wraps=cd
    cd $argv && ls -l --color=auto
end

According to man function, the --wraps option "causes the function to inherit completions from the given wrapped command."

However, when I type cl and start to tab-complete, I'm shown options which include non-directories (like .c files). However, when I type cd and then tab-complete, I'm only shown directories.

Did I define my function incorrectly?

2
  • I wasn't able to reproduce this. If you run functions cl does it show the wraps argument? What does fish --version show? Commented Oct 30, 2021 at 3:27
  • Yeah, it shows the --wraps=cd. The version of fish is 3.1.2. Commented Oct 30, 2021 at 21:20

1 Answer 1

1

You're hitting this issue which was fixed in fish shell version 3.3.0. Upgrade to a newer fish and it should fixed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .