/ Published in: Bash

URL: http://siwego.net/dev/git.png
edit
ppath
in code header to your git projects path, put this code into .bashrc file and copy it into your $HOME dir (in Win Vista / 7 it is often c:\Users\$YOU)you may want set this file as executable inside GIT bash chmod +x .bashrc (but its probably redundant, since this file is stored on ntfs filesystem)
Expand |
Embed | Plain Text
#!/bin/bash ppath="/d/-projects/-github" cd $ppath unset PROJECTS PROJECTS+=(".") i=0 echo echo -e "projects:\n-------------" for f in * do if [ -d "$f" ] then PROJECTS+=("$f") echo -e $((++i)) "- \e[1m$f\e[0m" fi done if [ ${#PROJECTS[@]} -gt 1 ] then echo -ne "\nchoose project: " read proj case "$proj" in [0-`expr ${#PROJECTS[@]} - 1`]) cd "${PROJECTS[proj]}" ;; *) echo " wrong choice" ;; esac else echo "there is no projects" fi unset PROJECTS
Comments

You need to login to post a comment.
download best software to android root use app kingo or 360 for pc mac ios windows 10 8 1 7 xp computer www