Skip to content

Conversation

@DannyBen
Copy link
Member

@DannyBen DannyBen commented May 19, 2022

Allow using wildcard in the middle of the pattern. When used, a wildcard will not be added to the end of the pattern, allowing to set specific completions for --flags. For example:

ftp:
- connect

ftp connect:
- "-p"
- "--protocol"

ftp connect*--protocol:
- scp
- ssh
- sftp

cc bashly-framework/bashly#224


In addition, generating/previewing the script when the COMPLETELY_DEBUG environment variable is set, will add another snippet of code to the generated script, allowing to debug the compline and cur variables:

  if [[ -n "$COMPLETELY_DEBUG" ]]; then
    echo "compline: '$compline'" > 'completely-debug.txt'
    echo "cur:      '$cur'" >> 'completely-debug.txt'
  fi

@DannyBen DannyBen merged commit 0848adf into master May 19, 2022
@DannyBen DannyBen deleted the add/mid-wildcard-support branch May 19, 2022 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants