-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
82 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
.idea/ | ||
cz/target | ||
Session.vim | ||
target |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,24 @@ Linux-only. | |
- Bash | ||
- Zsh | ||
|
||
### Install using binary release (recommended) | ||
### Install/update using installation script (recommended) | ||
|
||
To install `cz`, you can just run the installation script `install`. | ||
|
||
You can download the script from the following URL: | ||
- <https://raw.githubusercontent.com/j-morano/contemporary-z/main/z.sh> | ||
|
||
To see the different installation options, you can just type: | ||
```shell | ||
./install --help | ||
``` | ||
|
||
The default installation path is `$HOME/.local/bin/`. | ||
|
||
> NOTE: in order to execute it, the script must be executable, so the command `chmod +x install` may be needed. | ||
|
||
### Install manually using binary release | ||
|
||
To install the program using the binary release, copy and paste the following commands in your terminal. | ||
|
||
|
@@ -42,18 +59,18 @@ To install the program using the binary release, copy and paste the following co | |
```shell | ||
wget https://github.com/j-morano/contemporary-z/releases/latest/download/cz | ||
chmod +x cz | ||
cp cz $HOME/.local/bin/ | ||
mv cz $HOME/.local/bin/ | ||
wget https://raw.githubusercontent.com/j-morano/contemporary-z/main/z.fish | ||
mkdir -p $HOME/.config/fish/functions | ||
cp z.fish $HOME/.config/fish/functions | ||
mv z.fish $HOME/.config/fish/functions | ||
``` | ||
|
||
#### Bash/Zsh | ||
|
||
```shell | ||
wget https://github.com/j-morano/contemporary-z/releases/latest/download/cz | ||
chmod +x cz | ||
cp cz $HOME/.local/bin/ | ||
mv cz $HOME/.local/bin/ | ||
wget https://raw.githubusercontent.com/j-morano/contemporary-z/main/z.sh | ||
cat z.sh >> $HOME/.bashrc | ||
``` | ||
|
@@ -63,17 +80,17 @@ cat z.sh >> $HOME/.bashrc | |
```shell | ||
wget https://github.com/j-morano/contemporary-z/releases/latest/download/cz | ||
chmod +x cz | ||
cp cz $HOME/.local/bin/ | ||
mv cz $HOME/.local/bin/ | ||
``` | ||
|
||
### Install from source | ||
### Install manually from source | ||
|
||
To install `cz` from source, it is required to have installed [Cargo](https://doc.rust-lang.org/cargo/), the Rust _package manager_. You can install Rust, with `rustc` and `cargo`, following the instructions on [this](https://www.rust-lang.org/tools/install) page or from the official repositories of your distribution. | ||
|
||
If this requirement is met, it is only necessary to clone the repository and run the specific installation script for the desired shell. | ||
|
||
|
||
#### Debian-based distros: | ||
#### Debian-based distros | ||
|
||
In Debian-based distros (like Ubuntu), it is necessary to install the `build-essential` meta-package: | ||
|
||
|
@@ -88,39 +105,37 @@ In Arch-based distros, it is necessary to install the `base-devel` meta-package: | |
sudo pacman -S base-devel | ||
``` | ||
|
||
#### Repository cloning | ||
#### Clone the repository | ||
|
||
Using SSH: | ||
```shell | ||
git clone [email protected]:sonarom/contemporary-z.git | ||
``` | ||
|
||
Using HTTPS: | ||
```shell | ||
git clone https://github.com/sonarom/contemporary-z.git | ||
git clone https://github.com/j-morano/contemporary-z.git | ||
``` | ||
|
||
#### Install using Cargo | ||
|
||
```shell | ||
$HOME/.cargo/bin/cargo install --path cz | ||
$HOME/.cargo/bin/cargo install --path . | ||
``` | ||
|
||
Then, depending on the shell, do the following. | ||
|
||
> NOTE: ensure that `$HOME/.cargo/bin/` is in `$PATH`. | ||
Then, depending on the shell, do the following. | ||
|
||
> NOTE: You must be inside the repository folder (`contemporary-z`) to run the commands as shown below. | ||
#### Fish | ||
|
||
Add the function to fish functions. | ||
|
||
```shell | ||
mkdir -p $HOME/.config/fish/functions | ||
cp z.fish $HOME/.config/fish/functions | ||
mv z.fish $HOME/.config/fish/functions | ||
``` | ||
|
||
#### Bash/Zsh | ||
|
||
Add the code from `z.sh` to `.bashrc`. For example: | ||
|
||
```shell | ||
cat z.sh >> $HOME/.bashrc | ||
``` | ||
|
@@ -130,9 +145,12 @@ cat z.sh >> $HOME/.bashrc | |
The default alias of Contemporary-z is `z`. However, if a different alias is preferred, it can be easily changed in the installation scripts. Hereafter, `cz` refers to the entire application, and `z` refers to the command. | ||
|
||
|
||
### Usage: | ||
### Usage | ||
|
||
To see the usage of `cz`, you can just run it with the `--help` argument. | ||
|
||
``` | ||
$ z --help | ||
Usage: z [OPTION]... [DIRECTORY|SUBSTRING]... | ||
FUNCTIONALITY: | ||
|
@@ -183,7 +201,7 @@ Exit status: | |
0 if OK, | ||
1 if minor problems (e.g., cannot access subdirectory) | ||
Full documentation <https://github.com/sonarom/contemporary-z> | ||
Full documentation <https://github.com/j-morano/contemporary-z> | ||
``` | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.