mirror of
https://github.com/zdharma-continuum/zinit-annex-bin-gem-node.git
synced 2026-09-10 07:26:18 -04:00
Updated README.md
This commit is contained in:
parent
e909fe03e8
commit
ecd4c0965c
35
README.md
35
README.md
|
|
@ -1,6 +1,7 @@
|
|||
# z-a-bin-gem-node
|
||||
A Zsh-Zplugin annex (i.e. an extension) that provides functionality, which
|
||||
allows to:
|
||||
|
||||
1. Run programs and scripts without adding anything to `$PATH`,
|
||||
2. Install and run Ruby [gems](https://github.com/rubygems/rubygems) and
|
||||
[Node](https://github.com/npm/cli) modules from within a local directory
|
||||
|
|
@ -99,7 +100,9 @@ There are 7 ice-modifiers provided and handled by the annex. They are:
|
|||
|
||||
**The ice-modifiers in detail:**
|
||||
|
||||
### `fbin"[{g|n|c}:]{path-to-binary}[ -> {name-of-the-function}]; …"`
|
||||
---
|
||||
|
||||
## 1. **`fbin"[{g|n|c}:]{path-to-binary}[ -> {name-of-the-function}]; …"`**
|
||||
|
||||
Creates a wrapper function of the name the same as the last segment of the
|
||||
path or as `{name-of-the-function}`. The optional preceding flags mean:
|
||||
|
|
@ -122,8 +125,10 @@ myfzf () {
|
|||
}
|
||||
```
|
||||
|
||||
### `gem'{gem-name}; …'`
|
||||
### `gem'[{path-to-binary} <-] !{gem-name} [-> {name-of-the-function}]; …'`
|
||||
---
|
||||
|
||||
## 2. **`gem"{gem-name}; …"`**
|
||||
## **`gem"[{path-to-binary} <-] !{gem-name} [-> {name-of-the-function}]; …"`**
|
||||
|
||||
Installs the gem of name `{gem-name}` with `$GEM_HOME` set to the plugin's or
|
||||
snippet's directory. In other words, the gem and its dependencies will be
|
||||
|
|
@ -145,8 +150,10 @@ asciidoctor () {
|
|||
}
|
||||
```
|
||||
|
||||
### `node'{node-module}; …'`
|
||||
### `node'[{path-to-binary} <-] !{node-module} [-> {name-of-the-function}]; …'`
|
||||
---
|
||||
|
||||
## 3. **`node"{node-module}; …"`**
|
||||
## **`node"[{path-to-binary} <-] !{node-module} [-> {name-of-the-function}]; …"`**
|
||||
|
||||
Installs the node module of name `{node-module}` inside the plugin's or
|
||||
snippet's directory.
|
||||
|
|
@ -177,8 +184,10 @@ In this case the name of the binary program provided by the node module is
|
|||
different from its name, hence the second form with the `b <- a -> c` syntax
|
||||
has been used.
|
||||
|
||||
### `fmod'[{g|n|c}:]{function-name}; …'`
|
||||
### `fmod'[{g|n|c}:]{function-name} -> {wrapping-function-name}; …'`
|
||||
---
|
||||
|
||||
## 4. **`fmod"[{g|n|c}:]{function-name}; …"`**
|
||||
## **`fmod"[{g|n|c}:]{function-name} -> {wrapping-function-name}; …"`**
|
||||
|
||||
It wraps given function with the ability to set `$GEM_HOME`, etc. – the
|
||||
meaning of the `g`,`n` and `c` flags is the same as in the `fbin''` ice.
|
||||
|
|
@ -210,7 +219,9 @@ LICENSE
|
|||
README.md
|
||||
```
|
||||
|
||||
### `sbin"[{g|n|c}:]{path-to-binary}[ -> {name-of-the-script}]; …"`
|
||||
---
|
||||
|
||||
## 5. **`sbin"[{g|n|c}:]{path-to-binary}[ -> {name-of-the-script}]; …"`**
|
||||
|
||||
It creates the so called `shim` known from `rbenv` – a wrapper script that
|
||||
forwards the call to the actual binary. The script is created always under
|
||||
|
|
@ -241,8 +252,10 @@ function fzf {
|
|||
fzf "$@"
|
||||
```
|
||||
|
||||
### `fsrc"[{g|n|c}:]{path-to-script}[ -> {name-of-the-function}]; …"`
|
||||
### `ferc"[{g|n|c}:]{path-to-script}[ -> {name-of-the-function}]; …"`
|
||||
---
|
||||
|
||||
## 6. **`fsrc"[{g|n|c}:]{path-to-script}[ -> {name-of-the-function}]; …"`**
|
||||
## 7. **`ferc"[{g|n|c}:]{path-to-script}[ -> {name-of-the-function}]; …"`**
|
||||
|
||||
Creates a wrapper function that at each invocation sources the given file.
|
||||
The second ice, `ferc''` works the same with the single difference that it
|
||||
|
|
@ -278,4 +291,6 @@ Simply load like a regular plugin, i.e.:
|
|||
zplugin light zplugin/z-a-bin-gem-node
|
||||
```
|
||||
|
||||
After executing this command you can then use the dl'' and patch'' ice-mods.
|
||||
|
||||
<!-- vim:set ft=markdown fo+=an1 autoindent tw=77: -->
|
||||
|
|
|
|||
Loading…
Reference in a new issue