mirror of
https://github.com/zdharma-continuum/zinit-annex-rust.git
synced 2026-09-10 04:36:14 -04:00
Merge pull request #1 from vladdoster/patch-1
This commit is contained in:
commit
da4b29eba2
26
README.md
26
README.md
|
|
@ -9,10 +9,10 @@ created (name borrowed from `rbenv`) – a script that's located in the standar
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
function lsd {
|
||||
local bindir="/root/.zinit/plugins/zdharma---null/bin"
|
||||
local -x PATH="/root/.zinit/plugins/zdharma---null"/bin:"$PATH" # -x means export
|
||||
local -x RUSTUP_HOME="/root/.zinit/plugins/zdharma---null"/rustup \
|
||||
CARGO_HOME="/root/.zinit/plugins/zdharma---null"
|
||||
local bindir="/root/.zinit/plugins/zdharma-continuum---null/bin"
|
||||
local -x PATH="/root/.zinit/plugins/zdharma-continuum---null"/bin:"$PATH" # -x means export
|
||||
local -x RUSTUP_HOME="/root/.zinit/plugins/zdharma-continuum---null"/rustup \
|
||||
CARGO_HOME="/root/.zinit/plugins/zdharma-continuum---null"
|
||||
|
||||
"$bindir"/"lsd" "$@"
|
||||
}
|
||||
|
|
@ -36,39 +36,39 @@ Example uses are:
|
|||
# Installs rust and then the `lsd' crate and creates
|
||||
# the `lsd' shim exposing the binary
|
||||
zinit ice rustup cargo'!lsd'
|
||||
zinit load zdharma/null
|
||||
zinit load zdharma-continuum/null
|
||||
|
||||
# Installs rust and then the `exa' crate and creates
|
||||
# the `ls' shim exposing the `exa' binary
|
||||
zinit ice rustup cargo'!exa -> ls'
|
||||
zinit load zdharma/null
|
||||
zinit load zdharma-continuum/null
|
||||
|
||||
# Installs rust and then the `exa' and `lsd' crates
|
||||
zinit ice rustup cargo'exa;lsd'
|
||||
zinit load zdharma/null
|
||||
zinit load zdharma-continuum/null
|
||||
|
||||
# Installs rust and then the `exa' and `lsd' crates
|
||||
# and exposes their binaries by altering $PATH
|
||||
zinit ice rustup cargo'exa;lsd' as"command" pick"bin/(exa|lsd)"
|
||||
zinit load zdharma/null
|
||||
zinit load zdharma-continuum/null
|
||||
|
||||
# Installs rust and then the `exa' crate and creates
|
||||
# its shim with standard error redirected to /dev/null
|
||||
zinit ice rustup cargo'!E:exa'
|
||||
zinit load zdharma/null
|
||||
zinit load zdharma-continuum/null
|
||||
|
||||
# Just install rust and make it available globally in the system
|
||||
zinit ice id-as"rust" wait"0" lucid rustup as"command" \
|
||||
pick"bin/rustc" atload="export \
|
||||
CARGO_HOME=\$PWD RUSTUP_HOME=\$PWD/rustup"
|
||||
zinit load zdharma/null
|
||||
zinit load zdharma-continuum/null
|
||||
|
||||
# A little more complex rustup configuration that uses Bin-Gem-Node annex
|
||||
# and installs the cargo completion provided with rustup, using for-syntax
|
||||
zinit id-as=rust wait=1 as=null sbin="bin/*" lucid rustup \
|
||||
atload="[[ ! -f ${ZINIT[COMPLETIONS_DIR]}/_cargo ]] && zi creinstall rust; \
|
||||
export CARGO_HOME=\$PWD RUSTUP_HOME=\$PWD/rustup" for \
|
||||
zdharma/null
|
||||
zdharma-continuum/null
|
||||
|
||||
```
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ and/or `… -> {shim-name}` allows to override them.
|
|||
Simply load like a regular plugin, i.e.:
|
||||
|
||||
```zsh
|
||||
zinit light zinit-zsh/z-a-rust
|
||||
zinit light zdharma-continuum/z-a-rust
|
||||
```
|
||||
|
||||
This installs the annex and makes the `rustup` and `cargo''` ices available.
|
||||
|
|
@ -97,6 +97,6 @@ This installs the annex and makes the `rustup` and `cargo''` ices available.
|
|||
# Example
|
||||
|
||||

|
||||
use](https://raw.githubusercontent.com/zdharma-continuum/z-a-rust/master/images/z-a-rust.png)
|
||||
|
||||
<!-- vim:set ft=markdown tw=80 fo+=an1 autoindent: -->
|
||||
|
|
|
|||
Loading…
Reference in a new issue