Skip to content

Commit 2ef81ef

Browse files
author
Yaroslav Voronoy
committed
Merge branch 'master' of github.com:yvoronoy/magento2-bash-completion
2 parents 5721d24 + 765be30 commit 2ef81ef

File tree

1 file changed

+44
-2
lines changed

1 file changed

+44
-2
lines changed

README.md

+44-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,44 @@
1-
# magento2-bash-completion
2-
Magento2 Bash Completion
1+
# Magento2 Bash Completion
2+
One of the nicest facilities of the modern shell is the built in bash completion support. This script allows you to complete commands and options for Magento CLI bin/magento.
3+
4+
## Example
5+
6+
![Magento2 Bash Completion Screenshot](https://raw.githubusercontent.com/yvoronoy/ReadmeMedia/master/magento2-bash-completion.gif)
7+
8+
```
9+
user@host:~$ bin/magento[TAB][TAB]
10+
admin:user:create info:dependencies:show-modules-circular
11+
admin:user:unlock info:language:list
12+
bash:completion:generate info:timezone:list
13+
14+
...
15+
```
16+
17+
```
18+
user@host:~$ bin/magento setup:install --[TAB][TAB]
19+
--admin-email --db-password
20+
--admin-firstname --db-prefix
21+
--admin-lastname --db-user
22+
```
23+
24+
## Installation
25+
New completion commands may be placed inside the directory /etc/bash_completion.d or inside /usr/local/etc/bash_completion.d/magento2-bash-completion on MacOSX.
26+
27+
Mac OSX
28+
```
29+
sudo curl -o /usr/local/etc/bash_completion.d/magento2-bash-completion https://raw.githubusercontent.com/yvoronoy/magento2-bash-completion/master/magento2-bash-completion
30+
```
31+
32+
33+
Linux
34+
```
35+
#Linux
36+
sudo curl -o /etc/bash_completion.d/magento2-bash-completion https://raw.githubusercontent.com/yvoronoy/magento2-bash-completion/master/magento2-bash-completion
37+
```
38+
39+
Don't forget reload shell or you can load new complition by next command: `user@host:~$ . /etc/bash_completion.d/magento2-bash-completion`
40+
41+
42+
If you don't have installed bash-completion follow these guides:
43+
* [How to install bash-completion in Debian](https://www.howtoforge.com/how-to-add-bash-completion-in-debian)
44+
* [How to install bash-completion in MacOSX](http://davidalger.com/development/bash-completion-on-os-x-with-MacOSX)

0 commit comments

Comments
 (0)