Skip to content

Instantly share code, notes, and snippets.

@alber70g
Created February 16, 2016 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alber70g/701892ee731c9b339172 to your computer and use it in GitHub Desktop.
Save alber70g/701892ee731c9b339172 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Borrowed from grunt-cli
# http://gruntjs.com/
#
# Copyright (c) 2012 Tyler Kellen, contributors
# Licensed under the MIT license.
# https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
# Usage:
#
# To enable bash <tab> completion for gulp, add the following line (minus the
# leading #, which is the bash comment character) to your ~/.bashrc file:
#
# eval "$(gulp --completion=bash)"
# Enable bash autocompletion.
#cd /c/Projects/
function _gulp_completions() {
# The currently-being-completed word.
local cur="${COMP_WORDS[COMP_CWORD]}"
#Grab tasks
local compls=$(gulp --tasks-simple)
# Tell complete what stuff to show.
COMPREPLY=($(compgen -W "$compls" -- "$cur"))
}
complete -o default -F _gulp_completions gulp
## Aliases
alias mcr="cd /c/Projects/mobile-contract-registration"
alias tts="cd /c/Projects/TTS"
alias projects="cd /c/Projects"
alias pullall="find . -type d -maxdepth 1 -exec sh -c '(echo -e \"\e[4m{} \e[0m:\" && cd {} && git pull)' ';'"
alias fetchall="find . -type d -maxdepth 1 -exec sh -c '(echo -e \"\e[4m{} \e[0m:\" && cd {} && git fetch)' ';'"
alias masterall="find . -type d -maxdepth 1 -exec sh -c '(echo -e \"\e[4m{} \e[0m:\" && cd {} && git checkout master)' ';'"
alias devall="find . -type d -maxdepth 1 -exec sh -c '(echo -e \"\e[4m{} \e[0m:\" && cd {} && git checkout develop)' ';'"
alias resetall="find . -type d -maxdepth 1 -exec sh -c '(echo -e \"\e[4m{} \e[0m:\" && cd {} && git reset head --hard)' ';'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment