Utils Aliases Functions helps you to replace manual tasks for functions in bash terminal globally.
If you wish to use Javascript or another programming language instead the common SH Functions this is the correct repository.
Developed by: @GabrielAlonsoCabral
# clone this repository
$ git clone https://github.com/GabrielAlonsoCabral/utils-aliases-functions.git .aliases
$ cd .aliases
- Inside
.credentials/
Replace youraws.credentials.example.json
byaws.credentials.json
- Replace profiles in JSON by your aws profiles
Add this code lines on your ~/.zshrc
export ALIASES_PATH="$HOME/.aliases"
export AWS_PATH="$HOME/.aws"
export GH_NAME="ADD_YOUR_GITHUB_NAME"
function toggleAwsProfile {
currentPath=$PWD;
cd $ALIASES_PATH;
node $ALIASES_PATH/functions/toggle-aws-profile.js;
cd $currentPath;
}
function showAwsProfile {
currentPath=$PWD;
cd $ALIASES_PATH;
node $ALIASES_PATH/functions/show-aws-profile.js;
cd $currentPath;
}
function commit (){
/usr/bin/python $ALIASES_PATH/functions/commit.py "$@"
}
function pull (){
/usr/bin/python $ALIASES_PATH/functions/pull.py "$@"
}
function push (){
/usr/bin/python $ALIASES_PATH/functions/push.py "$@"
}
function branch (){
/usr/bin/python $ALIASES_PATH/functions/branch.py "$@"
}
function portkill (){
sh $ALIASES_PATH/functions/portkill.sh "$@"
}
Enable Changes
$ source ~/.zshrc
Add this code lines on your ~/.bashrc
export ALIASES_PATH="$HOME/.aliases"
export AWS_PATH="$HOME/.aws"
export GH_NAME="ADD_YOUR_GITHUB_NAME"
function toggleAwsProfile {
currentPath=$PWD;
cd $ALIASES_PATH;
node $ALIASES_PATH/functions/toggle-aws-profile.js;
cd $currentPath;
}
function showAwsProfile {
currentPath=$PWD;
cd $ALIASES_PATH;
node $ALIASES_PATH/functions/show-aws-profile.js;
cd $currentPath;
}
function commit (){
python3 $ALIASES_PATH/functions/commit.py "$@"
}
function pull (){
python3 $ALIASES_PATH/functions/pull.py "$@"
}
function push (){
python3 $ALIASES_PATH/functions/push.py "$@"
}
function branch (){
python3 $ALIASES_PATH/functions/branch.py "$@"
}
function portkill (){
sh $ALIASES_PATH/functions/portkill.sh "$@"
}
Enable Changes
$ source ~/.bashrc
# Show your default AWS Profile
$ showAwsProfile
# Toggle your default AWS Profile
$ toggleAwsProfile
# Create a git branch with name pattern (ex: "GabrielAlonsoCabral/TITLE")
$ branch --name "TITLE"
# Push your current branch to remote origin
$ push
# pull your current branch with master
$ pull
# Add your changed files and commit it with pattern name
$ commit
# Add your changed files and commit it with pattern name and open pull request
$ commit --pr
# Kill process running in PORT 3000
$ portkill 3000