Skip to content

Commit

Permalink
Merge branch '5.4' into 6.0
Browse files Browse the repository at this point in the history
* 5.4:
  Fix polyfill-php73 requirement
  [CI] Fix package-tests workflow checks for contracts
  do not call preg_match() on null
  Fix UPGRADE files for framework.messenger.reset_on_message option
  [Messenger] [DI] Add auto-registration for BatchHandlerInterface
  Remove duplicated entry in UPGRADE-6.0.md
  Handle alias in completion script
  • Loading branch information
fabpot committed Dec 9, 2021
2 parents d5818ed + 9130e1a commit fafd980
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Resources/completion.bash
Expand Up @@ -9,6 +9,12 @@ _sf_{{ COMMAND_NAME }}() {
# Use newline as only separator to allow space in completion values
IFS=$'\n'
local sf_cmd="${COMP_WORDS[0]}"

# for an alias, get the real script behind it
if [[ $(type -t $sf_cmd) == "alias" ]]; then
sf_cmd=$(alias $sf_cmd | sed -E "s/alias $sf_cmd='(.*)'/\1/")
fi

if [ ! -f "$sf_cmd" ]; then
return 1
fi
Expand Down

0 comments on commit fafd980

Please sign in to comment.