mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2024-11-18 09:51:06 +01:00
Add .plugin
file and installation instructions for Oh My Zsh (#104).
This commit is contained in:
parent
00bd0e9125
commit
03bd381112
3 changed files with 26 additions and 1 deletions
7
Makefile
7
Makefile
|
@ -17,9 +17,11 @@ HEADER_FILES := \
|
|||
LICENSE
|
||||
|
||||
PLUGIN_TARGET := zsh-autosuggestions.zsh
|
||||
OH_MY_ZSH_LINK_TARGET := zsh-autosuggestions.plugin.zsh
|
||||
|
||||
ALL_TARGETS := \
|
||||
$(PLUGIN_TARGET)
|
||||
$(PLUGIN_TARGET) \
|
||||
$(OH_MY_ZSH_LINK_TARGET)
|
||||
|
||||
all: $(ALL_TARGETS)
|
||||
|
||||
|
@ -27,6 +29,9 @@ $(PLUGIN_TARGET): $(HEADER_FILES) $(SRC_FILES)
|
|||
cat $(HEADER_FILES) | sed -e 's/^/# /g' >> $@
|
||||
cat $(SRC_FILES) >> $@
|
||||
|
||||
$(OH_MY_ZSH_LINK_TARGET): $(PLUGIN_TARGET)
|
||||
ln -s $(PLUGIN_TARGET) $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm $(ALL_TARGETS)
|
||||
|
|
19
README.md
19
README.md
|
@ -24,6 +24,23 @@ It suggests commands as you type, based on command history.
|
|||
3. Start a new terminal session.
|
||||
|
||||
|
||||
### Oh My Zsh
|
||||
|
||||
1. Clone this repository into `$ZSH_CUSTOM/plugins` (by default `~/.oh-my-zsh/custom/plugins`)
|
||||
|
||||
```sh
|
||||
git clone git://github.com/tarruda/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
|
||||
```
|
||||
|
||||
2. Add the plugin to the list of plugins for Oh My Zsh to load:
|
||||
|
||||
```sh
|
||||
plugins=(zsh-autosuggestions)
|
||||
```
|
||||
|
||||
3. Start a new terminal session.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
As you type commands, you will see a completion offered after the cursor in a muted gray color. This color can be changed by setting the `ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE` variable. See [configuration](#configuration).
|
||||
|
@ -37,6 +54,8 @@ If you invoke the `forward-word` widget, it will partially accept the suggestion
|
|||
|
||||
You may want to override the default global config variables after sourcing the plugin. Default values of these variables can be found [here](src/config.zsh).
|
||||
|
||||
**Note:** If you are using Oh My Zsh, you can put this configuration in a file in the `$ZSH_CUSTOM` directory. See their comments on [overriding internals](https://github.com/robbyrussell/oh-my-zsh/wiki/Customization#overriding-internals).
|
||||
|
||||
|
||||
### Suggestion Highlight Style
|
||||
|
||||
|
|
1
zsh-autosuggestions.plugin.zsh
Symbolic link
1
zsh-autosuggestions.plugin.zsh
Symbolic link
|
@ -0,0 +1 @@
|
|||
zsh-autosuggestions.zsh
|
Loading…
Reference in a new issue