summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2018-03-07 21:34:05 +0000
committerGitHub <noreply@github.com>2018-03-07 21:34:05 +0000
commitf298ebb2179eff947cdb9cb7a4bd96e9739eac5c (patch)
tree16500c7f17e68d91a39b5908f327d7aac752401a /README.md
parent7f2b398ad2084bdaaa266e8da770a213f0a9a2eb (diff)
Add shell completions and manpage
* Add manpage Adds a basic manpage that was autogenerated with `help2man` and then slightly adjusted with information from the README.md and better formatting. * Add zsh completions Add completions for the zsh shell. These should be complete and even allow completion of the command inside `--command` and `-e`. * Add bash completions The bash completions are almost on the same level as the zsh completions. The only little thing the bash completions do not do is complete inside of `--command` and `-e`, instead bash just stops completion after these options. * Update readme with manpage and completions Added the install instructions for the manpage and completions to the README.md. Also tweaked the current readme a slight bit because the build section was structured in a slightly confusing way.
Diffstat (limited to 'README.md')
-rw-r--r--README.md51
1 files changed, 48 insertions, 3 deletions
diff --git a/README.md b/README.md
index 89b324b9..f2237098 100644
--- a/README.md
+++ b/README.md
@@ -213,6 +213,11 @@ filling in this section of the README.
### Building
+**BEFORE YOU RUN IT:** Install the config file as described below; otherwise,
+many things (such as arrow keys) will not work.
+
+#### Linux
+
Once all the prerequisites are installed, compiling Alacritty should be easy:
```sh
@@ -220,10 +225,8 @@ cargo build --release
```
If all goes well, this should place a binary at `target/release/alacritty`.
-**BEFORE YOU RUN IT:** Install the config file as described below; otherwise,
-many things (such as arrow keys) will not work.
-### Desktop Entry
+##### Desktop Entry
Many linux distributions support desktop entries for adding applications to
system menus. To install the desktop entry for Alacritty, run
@@ -233,6 +236,8 @@ sudo cp target/release/alacritty /usr/local/bin # or anywhere else in $PATH
cp Alacritty.desktop ~/.local/share/applications
```
+#### MacOS
+
To build an application for macOS, run
```sh
@@ -240,6 +245,46 @@ make app
cp -r target/release/osx/Alacritty.app /Applications/
```
+## Manual Page
+
+Installing the manual page requires the additional dependency `gzip`.
+To install the manual page, run
+
+```sh
+sudo mkdir -p /usr/local/share/man/man1
+gzip -c alacritty.man | sudo tee /usr/local/share/man/man1/alacritty.1.gz > /dev/null
+```
+
+## Shell completions
+
+To get automatic completions for alacritty's flags and arguments you can install the provided shell completions.
+
+### Zsh
+
+To install the completions for zsh, run
+
+```
+sudo cp alacritty-completions.zsh /usr/share/zsh/functions/Completion/X/_alacritty
+```
+
+### Bash
+
+To install the completions for bash, you can `source` the `alacritty-completions.bash` in your `~/.bashrc` file.
+
+If you do not plan to delete the source folder of alacritty, you can run
+
+```sh
+echo "source $(pwd)/alacritty-completions.bash" >> ~/.bashrc
+```
+
+Otherwise you can copy it to the `~/.bash_completion` folder and source it from there:
+
+```sh
+mkdir -p ~/.bash_completion
+cp alacritty-completions.bash ~/.bash_completion/alacritty
+echo "source ~/.bash_completion/alacritty" >> ~/.bashrc
+```
+
## Configuration
Although it's possible the default configuration would work on your system,