mirror of
https://github.com/zdharma-continuum/zinit-annex-rust.git
synced 2026-09-10 04:36:14 -04:00
README.md,.gitignore
This commit is contained in:
parent
bf888284d3
commit
e3902232d6
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -21,8 +21,8 @@ Cargo.lock
|
||||||
.zcalc_history
|
.zcalc_history
|
||||||
|
|
||||||
# A popular plugin manager's files
|
# A popular plugin manager's files
|
||||||
._zplugin
|
._zinit
|
||||||
.zplugin_lstupd
|
.zinit_lastupd
|
||||||
|
|
||||||
# zdharma/zshelldoc tool's files
|
# zdharma/zshelldoc tool's files
|
||||||
zsdoc/data
|
zsdoc/data
|
||||||
|
|
|
||||||
36
README.md
36
README.md
|
|
@ -9,10 +9,10 @@ created (name borrowed from `rbenv`) – a script that's located in the standar
|
||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
function lsd {
|
function lsd {
|
||||||
local bindir="/root/.zplugin/plugins/zdharma---null/bin"
|
local bindir="/root/.zinit/plugins/zdharma---null/bin"
|
||||||
local -x PATH="/root/.zplugin/plugins/zdharma---null"/bin:"$PATH" # -x means export
|
local -x PATH="/root/.zinit/plugins/zdharma---null"/bin:"$PATH" # -x means export
|
||||||
local -x RUSTUP_HOME="/root/.zplugin/plugins/zdharma---null"/rustup \
|
local -x RUSTUP_HOME="/root/.zinit/plugins/zdharma---null"/rustup \
|
||||||
CARGO_HOME="/root/.zplugin/plugins/zdharma---null"
|
CARGO_HOME="/root/.zinit/plugins/zdharma---null"
|
||||||
|
|
||||||
"$bindir"/"lsd" "$@"
|
"$bindir"/"lsd" "$@"
|
||||||
}
|
}
|
||||||
|
|
@ -35,32 +35,32 @@ Example uses are:
|
||||||
```zsh
|
```zsh
|
||||||
# Installs rust and then the `lsd' crate and creates
|
# Installs rust and then the `lsd' crate and creates
|
||||||
# the `lsd' shim exposing the binary
|
# the `lsd' shim exposing the binary
|
||||||
zplugin ice rustup cargo'!lsd'
|
zinit ice rustup cargo'!lsd'
|
||||||
zplugin load zdharma/null
|
zinit load zdharma/null
|
||||||
|
|
||||||
# Installs rust and then the `exa' crate and creates
|
# Installs rust and then the `exa' crate and creates
|
||||||
# the `ls' shim exposing the `exa' binary
|
# the `ls' shim exposing the `exa' binary
|
||||||
zplugin ice rustup cargo'!exa -> ls'
|
zinit ice rustup cargo'!exa -> ls'
|
||||||
zplugin load zdharma/null
|
zinit load zdharma/null
|
||||||
|
|
||||||
# Installs rust and then the `exa' and `lsd' crates
|
# Installs rust and then the `exa' and `lsd' crates
|
||||||
zplugin ice rustup cargo'exa;lsd'
|
zinit ice rustup cargo'exa;lsd'
|
||||||
zplugin load zdharma/null
|
zinit load zdharma/null
|
||||||
|
|
||||||
# Installs rust and then the `exa' and `lsd' crates
|
# Installs rust and then the `exa' and `lsd' crates
|
||||||
# and exposes their binaries by altering $PATH
|
# and exposes their binaries by altering $PATH
|
||||||
zplugin ice rustup cargo'exa;lsd' as"command" pick"bin/(exa|lsd)"
|
zinit ice rustup cargo'exa;lsd' as"command" pick"bin/(exa|lsd)"
|
||||||
zplugin load zdharma/null
|
zinit load zdharma/null
|
||||||
|
|
||||||
# Installs rust and then the `exa' crate and creates
|
# Installs rust and then the `exa' crate and creates
|
||||||
# its shim with standard error redirected to /dev/null
|
# its shim with standard error redirected to /dev/null
|
||||||
zplugin ice rustup cargo'!E:exa'
|
zinit ice rustup cargo'!E:exa'
|
||||||
zplugin load zdharma/null
|
zinit load zdharma/null
|
||||||
|
|
||||||
# Just install rust and make it available globally in the system
|
# Just install rust and make it available globally in the system
|
||||||
zplugin ice id-as"rust" wait"0" lucid rustup as"command" \
|
zinit ice id-as"rust" wait"0" lucid rustup as"command" \
|
||||||
pick"bin/rustc" atload="export RUSTUP_HOME=\$PWD/rustup"
|
pick"bin/rustc" atload="export RUSTUP_HOME=\$PWD/rustup"
|
||||||
zplugin load zdharma/null
|
zinit load zdharma/null
|
||||||
```
|
```
|
||||||
|
|
||||||
Flags meanings:
|
Flags meanings:
|
||||||
|
|
@ -80,7 +80,7 @@ and/or `… -> {shim-name}` allows to override them.
|
||||||
Simply load like a regular plugin, i.e.:
|
Simply load like a regular plugin, i.e.:
|
||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
zplugin light zplugin/z-a-rust
|
zinit light zinit-zsh/z-a-rust
|
||||||
```
|
```
|
||||||
|
|
||||||
This installs the annex and makes the `rustup` and `cargo''` ices available.
|
This installs the annex and makes the `rustup` and `cargo''` ices available.
|
||||||
|
|
@ -88,6 +88,6 @@ This installs the annex and makes the `rustup` and `cargo''` ices available.
|
||||||
# Example
|
# Example
|
||||||
|
|
||||||

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