This file contains hidden or 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
# I'm a lame, sorry | |
FIRST_RUN="true"; | |
function show_aliases_available_for_the_last_command { | |
if [[ "$FIRST_RUN" == "true" ]]; then | |
FIRST_RUN="false"; | |
return; | |
fi | |
local LAST_COMMAND=$(history | tail -1 | cut -d' ' -f2- | xargs); | |
local FOUND_ALIASES=$(alias | egrep "^[a-z]+='$LAST_COMMAND .*'$"); |
This file contains hidden or 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
#!/bin/bash | |
function git_clean_local_branches { | |
TO_REMOVE=`git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}'`; | |
TO_REMOVE_LINES=`git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | wc -l` | |
if [ "$TO_REMOVE_LINES" -ne 0 ]; then | |
echo "Removing branches..." | |
printf "\n$TO_REMOVE\n\n"; | |
echo "Proceed?"; |
This file contains hidden or 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
function git_clean_local_branches { | |
TO_REMOVE=`git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}'`; | |
TO_REMOVE_LINES=`git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | wc -l` | |
if [ "$TO_REMOVE_LINES" -ne 0 ]; then | |
echo "Removing branches..." | |
printf "\n$TO_REMOVE\n\n"; | |
echo "Proceed?"; | |
select result in Yes No; do | |
if [[ "$result" == "Yes" ]]; then |
This file contains hidden or 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
function git_clean_untracked_safely { | |
TO_REMOVE=`git clean -f -d -n`; | |
TO_REMOVE_LINES=`git clean -f -d -n | wc -l`; | |
if [ "$TO_REMOVE_LINES" -ne "0" ]; then | |
echo "Cleaning"; | |
printf "\n$TO_REMOVE\n\n"; | |
echo "Proceed?"; | |
select result in Yes No; do | |
if [[ "$result" == "Yes" ]]; then | |
echo "Cleaning in progress..." |