mirror of
https://github.com/tomru/DotfilesOld.git
synced 2026-03-03 14:37:25 +01:00
start out with thoughtbots version
This commit is contained in:
committed by
Thomas Ruoff
parent
891caebf74
commit
bc1bd4f5e6
4
zsh/functions/_git_delete_branch
Normal file
4
zsh/functions/_git_delete_branch
Normal file
@@ -0,0 +1,4 @@
|
||||
_git_delete_branch ()
|
||||
{
|
||||
__gitcomp "$(__git_heads)"
|
||||
}
|
||||
9
zsh/functions/change-extension
Normal file
9
zsh/functions/change-extension
Normal 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
10
zsh/functions/envup
Normal 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
9
zsh/functions/g
Normal 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
5
zsh/functions/mcd
Normal file
@@ -0,0 +1,5 @@
|
||||
# Make directory and change into it.
|
||||
|
||||
function mcd() {
|
||||
mkdir -p "$1" && cd "$1";
|
||||
}
|
||||
Reference in New Issue
Block a user