Skip to content

Commit

Permalink
Merge pull request #4 from Jarsop/feature/radx
Browse files Browse the repository at this point in the history
Feature/radx
  • Loading branch information
Jarsop authored Nov 22, 2020
2 parents 1f363aa + 16266dd commit 1c68fb1
Show file tree
Hide file tree
Showing 30 changed files with 1,224 additions and 62 deletions.
15 changes: 13 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rualdi"
version = "0.1.6"
version = "0.2.0"
authors = ["Jarsop <[email protected]>"]
description = "Rust Aliasing Directory"
license = "AGPL-3.0-or-later"
Expand All @@ -11,7 +11,7 @@ keywords = ["cli", "shell", "utility", "bash", "zsh"]
readme = "README.md"

[dependencies]
rualdlib = { version = "0.1.0", path = "rualdlib" }
rualdlib = { version = "0.1.1", path = "rualdlib" }
structopt = "0.3.17"
anyhow = "1.0.32"
dirs-next = "2.0.0"
Expand All @@ -20,6 +20,7 @@ dirs-next = "2.0.0"
tempfile = "3.1.0"
toml = "0.5.6"
serial_test = "0.5.0"
gag = "0.1.10"

[package.metadata.deb]
maintainer = "Jarsop <[email protected]>"
Expand Down
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Rust Aliasing Directory

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

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

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

radax workdir # Add current directory with workdir as alias
# and add environment variable named RAD_WORKDIR
# in current environment and in configuration file
radax workdir . wd # Add current directory with workdir as alias
# and add environment variable named RAD_WD
# in current environment and to the configuration file

radx workdir wd # Add environment variable named RAD_WD which points
# on alias workdir in current environment
# and to the configuration file
radx workdir # Add environment variable named RAD_WORKDIR
# which points on alias workdir in current environment
# and to the configuration file

radxn workdir wd # Add environment variable named RAD_WD which points
# on alias workdir in current environment
# without adding it to the configuration file

rad www/some-site # Perform cd in /var/www/some-site
rad - # Go back to previous directory as cd do it

radr workdir # Remove workdir alias
radr workdir # Remove workdir alias and environment variable associated if exists
radr www stuff # Works with multiple aliases at same time

radl # List aliases
radxr workdir # Remove environment variable which points on alias workdir

radl # List aliases and environment variables
```

## Getting started
Expand Down
2 changes: 1 addition & 1 deletion rualdlib/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rualdlib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rualdlib"
version = "0.1.0"
version = "0.1.1"
authors = ["Jarsop <[email protected]>"]
description = "Rust Aliasing Directory"
license = "AGPL-3.0-or-later"
Expand Down
Loading

0 comments on commit 1c68fb1

Please sign in to comment.