start out with thoughtbots version

This commit is contained in:
Thomas Ruoff
2017-08-13 23:14:19 +02:00
committed by Thomas Ruoff
parent 891caebf74
commit bc1bd4f5e6
24 changed files with 279 additions and 126 deletions

View File

@@ -0,0 +1,4 @@
_git_delete_branch ()
{
__gitcomp "$(__git_heads)"
}

View File

@@ -0,0 +1,9 @@
# Change file extensions recursively in current directory
#
# change-extension erb haml
function change-extension() {
foreach f (**/*.$1)
mv $f $f:r.$2
end
}

10
zsh/functions/envup Normal file
View File

@@ -0,0 +1,10 @@
# Load .env file into shell session for environment variables
function envup() {
if [ -f .env ]; then
export $(cat .env)
else
echo 'No .env file found' 1>&2
return 1
fi
}

9
zsh/functions/g Normal file
View File

@@ -0,0 +1,9 @@
# No arguments: `git status`
# With arguments: acts like `git`
g() {
if [[ $# -gt 0 ]]; then
git "$@"
else
git status
fi
}

5
zsh/functions/mcd Normal file
View File

@@ -0,0 +1,5 @@
# Make directory and change into it.
function mcd() {
mkdir -p "$1" && cd "$1";
}