-
-
Notifications
You must be signed in to change notification settings - Fork 400
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More space in project root directory and align it's name with the other autocompletion files (fish, zsh). Register symfony-console-autocomplete as a development requirement. Reflect changes in docs. Make autocompletion compiling a first-level command. Integrate with Travis build.
- Loading branch information
Showing
14 changed files
with
120 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../build/bin/compile-bash-autocompletion.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
# | ||
# compile-bash-autocompletion | ||
# | ||
# generate bash autocompletion file for magerun | ||
# | ||
set -euo pipefail | ||
IFS=$'\n\t' | ||
|
||
header() | ||
{ | ||
cat <<EOF | ||
#!/bin/bash | ||
# Installation: | ||
# Copy to /etc/bash_completion.d/n98-magerun.phar | ||
# or | ||
# Append to ~/.bash_completion | ||
# open new or restart existing shell session | ||
EOF | ||
} | ||
|
||
base=magerun | ||
name=n98-${base} | ||
outfile=res/autocompletion/bash/n98-magerun.phar.bash | ||
|
||
if [[ ! -e "bin/${name}" ]]; then | ||
echo >2 "error: could not find 'bin/${name}' script" | ||
exit 1 | ||
fi | ||
|
||
echo "creating bash autocomplete file (this takes a little moment).." | ||
|
||
header > "${outfile}" | ||
vendor/bin/symfony-autocomplete -- "bin/${name}" \ | ||
| sed '1d ; $ s/$/.phar '"${name} ${base}"'/' \ | ||
>> "${outfile}" | ||
# sed: remove first line and expand last line to more command names (aliases) | ||
|
||
echo "updated \"${outfile}\"." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.