You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+71Lines changed: 71 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,77 @@ miactl help
41
41
```
42
42
43
43
44
+
## Enabling shell autocompletion
45
+
46
+
miactl provides autocompletion support for Bash, Zsh and Fish, which can save you a lot of typing.
47
+
48
+
### Bash
49
+
50
+
Completion could be generate running the `miactl completion bash` command.
51
+
In order to make this completion work, you should have [bash completion](https://github.com/scop/bash-completion)
52
+
correctly installed.
53
+
54
+
Warning: there are two versions of `bash-completion`, v1 and v2. V1 is for Bash 3.2 (which is the default on macOS), and v2 is for Bash 4.1+. The miactl completion script requires `bash-completion` v2 and Bash 4.1+.
55
+
56
+
**For linux:**
57
+
58
+
You could install `bash-completion` running `apt-get install bash-completion`.
59
+
60
+
The above command create `/usr/share/bash-completion/bash_completion`, which is the main script of bash completion.
61
+
Try to run the command `type _init_completion`. If the command succeeds, you're already seet. Otherwise add to the `~/.bashrc` file:
62
+
63
+
```sh
64
+
source /usr/share/bash-completion/bash_completion
65
+
```
66
+
67
+
After the correct installation if bash completion, you could make the completion works running:
Check the bash version running `echo $BASH_VERSION`. If the version is less than 4.1, you should install a new bash version with Homebrew running
75
+
76
+
```sh
77
+
brew install bash
78
+
```
79
+
80
+
Reload your shell and run the command `echo $BASH_VERSION` to verify the bash version.
81
+
82
+
Once installed the correct bash version, you should install `bash-completion` to v2. To check if it is already installed, run `type _init_completion`. If not, you can install it with Homebrew
0 commit comments