0

I just want the first argument to a function of mine to auto-complete with all possible executables.

This is what I added to my .bash_aliases

function viwhich() { vi `which $1` ; }

But now the executables don't auto complete anymore, e.g. TAB isn't working.

Is there a quick fix?

1 Answer 1

2

Found it

function viwhich() { vi `which $1` ; }
complete -c command viwhich

Nice

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.