
https://z.digitalclouds.dev | GitHub | Twitter
With use of the bin-gem-node annex you possibly can set up Ruby Gems and Node modules in an fascinating means:
- they’re going to be put in within the plugin’s or snippet’s listing,
- an automated operate shall be supplied to run the binary that is supplied by the package deal.
This has a number of advantages. For instance, no $PATH
alteration is required within the .zprofile
file. Additionally, the package deal shall be routinely up to date on zi replace
. Plus, the set up shall be remoted from different packages – a number of packages not be put in a single place.
An instance ZI invocation that installs the comment
software that can be utilized to transform Markdown paperwork into man pages:
zi ice wait'2' lucid id-as'comment' node'comment <- !remark-cli; remark-man'
zi snippet /dev/null
It’s snippet-based. An instance plugin-based invocation:
zi ice wait'2' lucid id-as'comment' node'comment <- !remark-cli; remark-man'
zi load z-shell/null
It has a bonus – it can delete the comment
operate when unloading the plugin.
The exclamation-mark earlier than !remark-cli
is essential – it causes the automated operate invoking the binary to be created.
Extra data will be discovered on the bin-gem-node annex page.
The command installs 2 node modules – remark-cli
and remark-man
(the backend for the comment
converter – comment
can convert additionally to different codecs).
Through the use of the exclamation-mark and the <-
pointer it additionally requests the operate that may run the comment
binary to be created. The operate has the next physique:
comment () {
native bindir="/root/.zi/plugins/comment/node_modules/.bin"
native -x NODE_PATH="/root/.zi/plugins/remark2"/node_modules
"$bindir"/"comment" "$@"
}
As it may be seen it finally supplies the comment
software to the command line.