Skip to content

Commit 16266dd

Browse files
committed
doc: update README
Signed-off-by: Jarsop <jarsop@outlook.com>
1 parent 7cd8806 commit 16266dd

1 file changed

Lines changed: 24 additions & 2 deletions

File tree

README.md

Lines changed: 24 additions & 2 deletions
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

0 commit comments

Comments
 (0)