Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dcat23 committed Mar 18, 2023
1 parent c9ad4a8 commit 5ae1746
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 106 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alias_commands.local
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# AliasCLI
# Alias CLI

## **Usage**

To use AliasCLI, you need to have the `alias_cli.sh` script and the `aliases` file in the same directory.
To use Alias CLI, you need to have the `alias_cli.sh` script and the `alias_commands` file in the same directory.

The `aliases` file contains the list of aliases that you want to manage with AliasCLI. Each alias should be defined as follows:
The `alias_commands` file contains the list of aliases that you want to manage with AliasCLI. Each alias should be defined as follows:

```bash
alias alias_name='command'
```

To manage aliases with AliasCLI, simply run the `al` command followed by the appropriate arguments.
To manage aliases with Alias CLI, simply run the `al` command followed by the appropriate arguments.

```bash
al [-h] [<alias> <command>] [-v <alias>] [-d <alias>]
Expand All @@ -32,8 +32,9 @@ For example, to create a new alias called "cm" that runs the "git commit -md" co
```bash
al cm "git commit -m"
```
> NOTE: Be sure to include quotations around the command
To view the command associated with the "g" alias, you would run:
To view the command associated with the "cm" alias, you would run:

```bash
al -v cm
Expand Down Expand Up @@ -67,8 +68,14 @@ Replace `/path/to/AliasCLI/` with the actual path to the AliasCLI folder on your

Once you've added this line to your shell configuration file, the `al` function will be loaded automatically every time you open a new terminal window.

To make the `al` function available in each new terminal from any directory, you can add `source /path/to/alias_cli.sh` command to your shell configuration file (~/.bashrc for Bash or ~/.zshrc for Zsh):
To make the `al` function available in each new terminal from any directory, you can add `source "$HOME/AliasCLI/alias_cli.sh"` command to your shell configuration file (~/.bashrc for Bash or ~/.zshrc for Zsh):

## Temporary Shell Variables
- `echo $ALIAS_COMMANDS_FILE`: location of aliases
- `echo $EXISTING_COMMAND`: most recently updated alias
- `echo $DELETED_COMMAND`: most recently deleted alias
- `./alias_commands.bak`: backup before recent changes

## **License**

AliasCLI is licensed under the [**MIT License**](https://opensource.org/license/mit).
Alias CLI is licensed under the [**MIT License**](https://opensource.org/license/mit).
2 changes: 1 addition & 1 deletion alias_cli.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export ALIAS_COMMANDS_FILE="$HOME/AliasCLI/alias_commands"
export ALIAS_COMMANDS_FILE="$HOME/aliascli/alias_commands"
source "$ALIAS_COMMANDS_FILE"

function al() {
Expand Down
6 changes: 5 additions & 1 deletion alias_commands
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# ALIAS COMMANDS

# system
# cd
alias hh="cd ~/"
alias des="cd ~/Desktop/"
alias doc="cd ~/Documents/"
alias dow="cd ~/Downloads/"


# git
alias cl="git clone"
alias st="git status"
Expand All @@ -32,6 +33,9 @@ alias ns="npm run start"
# python
alias py="python3"

# system
alias ee="logout"

# yarn
alias ya="yarn add"
alias yb="yarn build"
Expand Down
48 changes: 0 additions & 48 deletions aliases

This file was deleted.

49 changes: 0 additions & 49 deletions aliases.bak

This file was deleted.

0 comments on commit 5ae1746

Please sign in to comment.