-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Your code relies on word splitting suggestions=( $(compgen ... ) ) and the completion gives me wrong results before you set IFS=$'\n'. When you tested your function, you might have had IFS set from some previous attempts (since compgen also splits using IFS, I believe that really is the case). It's also subject to pathname expansion which is not that important here but still might be an issue in some extreme cases. set -f might be a good idea.
I believe that creating a completion that correctly handles whitespace characters and globs is extremely painful. I may have missed something of course and I might embarrass myself :) Overall it's a great article giving insight in some less known parts of bash 👍
iridakos, freeyy, piotrkilczuk and abhi-k9
Metadata
Metadata
Assignees
Labels
No labels
