Skip to content

Commit 1c68fb1

Browse files
authored
Merge pull request #4 from Jarsop/feature/radx
Feature/radx
2 parents 1f363aa + 16266dd commit 1c68fb1

30 files changed

+1224
-62
lines changed

Cargo.lock

+13-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rualdi"
3-
version = "0.1.6"
3+
version = "0.2.0"
44
authors = ["Jarsop <[email protected]>"]
55
description = "Rust Aliasing Directory"
66
license = "AGPL-3.0-or-later"
@@ -11,7 +11,7 @@ keywords = ["cli", "shell", "utility", "bash", "zsh"]
1111
readme = "README.md"
1212

1313
[dependencies]
14-
rualdlib = { version = "0.1.0", path = "rualdlib" }
14+
rualdlib = { version = "0.1.1", path = "rualdlib" }
1515
structopt = "0.3.17"
1616
anyhow = "1.0.32"
1717
dirs-next = "2.0.0"
@@ -20,6 +20,7 @@ dirs-next = "2.0.0"
2020
tempfile = "3.1.0"
2121
toml = "0.5.6"
2222
serial_test = "0.5.0"
23+
gag = "0.1.10"
2324

2425
[package.metadata.deb]
2526
maintainer = "Jarsop <[email protected]>"

README.md

+24-2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ Rust Aliasing Directory
2929

3030
Rualdi allows you to create aliases on directories and to provide
3131
an encapsulation of the built-in `cd` command function for easy change of working directory.
32+
You can also add environment variable which points on an alias.
33+
All variables sourced in your environment are prefixed by `RAD_`.
3234

3335
Inspired by [`zoxide`](https://github.com/ajeetdsouza/zoxide) code.
3436

@@ -38,13 +40,33 @@ rada workdir # Add current directory with workdir as alias
3840
rada www /var/www # Add /var/www directory with www as alias
3941
rada stuff ~/stuff # Works with home tild alias
4042

43+
radax workdir # Add current directory with workdir as alias
44+
# and add environment variable named RAD_WORKDIR
45+
# in current environment and in configuration file
46+
radax workdir . wd # Add current directory with workdir as alias
47+
# and add environment variable named RAD_WD
48+
# in current environment and to the configuration file
49+
50+
radx workdir wd # Add environment variable named RAD_WD which points
51+
# on alias workdir in current environment
52+
# and to the configuration file
53+
radx workdir # Add environment variable named RAD_WORKDIR
54+
# which points on alias workdir in current environment
55+
# and to the configuration file
56+
57+
radxn workdir wd # Add environment variable named RAD_WD which points
58+
# on alias workdir in current environment
59+
# without adding it to the configuration file
60+
4161
rad www/some-site # Perform cd in /var/www/some-site
4262
rad - # Go back to previous directory as cd do it
4363

44-
radr workdir # Remove workdir alias
64+
radr workdir # Remove workdir alias and environment variable associated if exists
4565
radr www stuff # Works with multiple aliases at same time
4666

47-
radl # List aliases
67+
radxr workdir # Remove environment variable which points on alias workdir
68+
69+
radl # List aliases and environment variables
4870
```
4971

5072
## Getting started

rualdlib/Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rualdlib/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rualdlib"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
authors = ["Jarsop <[email protected]>"]
55
description = "Rust Aliasing Directory"
66
license = "AGPL-3.0-or-later"

0 commit comments

Comments
 (0)