Skip to content

Commit dd40bd7

Browse files
authored
Update README.md
1 parent 3c5fc17 commit dd40bd7

File tree

1 file changed

+56
-2
lines changed

1 file changed

+56
-2
lines changed

README.md

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,56 @@
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+
user@host:~$ bin/magento[TAB][TAB]
7+
admin:user:create info:dependencies:show-modules-circular
8+
admin:user:unlock info:language:list
9+
bash:completion:generate info:timezone:list
10+
cache:clean list
11+
cache:disable maintenance:allow-ips
12+
cache:enable maintenance:disable
13+
...
14+
```
15+
16+
```
17+
user@host:~$ bin/magento setup:install --[TAB][TAB]
18+
--admin-email --db-password
19+
--admin-firstname --db-prefix
20+
--admin-lastname --db-user
21+
--admin-password --definition-format
22+
--admin-use-security-key --http-cache-hosts
23+
--admin-user --key
24+
--backend-frontname --language
25+
--base-url --magento-init-params
26+
--base-url-secure --sales-order-increment-prefix
27+
--cleanup-database --session-save
28+
--currency --skip-db-validation
29+
--db-engine --timezone
30+
--db-host --use-rewrites
31+
--db-init-statements --use-sample-data
32+
--db-model --use-secure
33+
--db-name --use-secure-admin
34+
```
35+
36+
## Installation
37+
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.
38+
39+
Mac OSX
40+
```
41+
sudo curl -o /usr/local/etc/bash_completion.d/magento2-bash-completion https://raw.githubusercontent.com/yvoronoy/magento2-bash-completion/master/magento2-bash-completion
42+
```
43+
44+
45+
Linux
46+
```
47+
#Linux
48+
sudo curl -o /etc/bash_completion.d/magento2-bash-completion https://raw.githubusercontent.com/yvoronoy/magento2-bash-completion/master/magento2-bash-completion
49+
```
50+
51+
Don't forget reload shell or you can load new complition by next command: `user@host:~$ . /etc/bash_completion.d/magento2-bash-completion`
52+
53+
54+
If you don't have installed bash-completion follow these guides:
55+
* (How to install bash-completion in Debian)[https://www.howtoforge.com/how-to-add-bash-completion-in-debian]
56+
* (How to install bash-completion in MacOSX)[http://davidalger.com/development/bash-completion-on-os-x-with-MacOSX

0 commit comments

Comments
 (0)