irongit

A combination of vim and bash that I find useful

ghostshell/ghost.sh
60 lines1.2 KBBourne Again Shell (bash)
1git config --global core.autocrlf input
2if uname -a | grep -q MINGW;then
3 alias python3=python
4 alias Python=python
5else
6 alias python=python3
7fi
8#alias python=python3
9alias Vim='vim ~/.vimrc'
10alias Gvim='vim ~/.ghost/ghost.vimrc'
11alias Gbash='vim ~/.ghost/ghost.sh'
12alias clip=clip.exe
13alias Bash='vim ~/.bashrc'
14alias Source='source ~/.bashrc'
15alias gcom='git add . && git commit -m'
16alias ghook='~/.ghost/ghook/startproject.sh'
17alias venv='python -m venv venv'
18function vsource() {
19 local start=`pwd`
20 for i in $(seq 1 5);do
21 if ! source venv/**/activate; then
22 cd ..
23 else
24 cd $start
25 break
26 fi
27 done
28}
29function Gpush() {
30 local start=`pwd`
31 local message=$@
32 cd ~/.ghost
33 gcom "$message"
34 git push -u origin main
35 cd $start
36}
37function Djs() {
38 local start=`pwd`
39 for i in $(seq 1 5);do
40 if test -f manage.py;then
41 python manage.py runserver $1
42 break
43 fi
44 done
45}
46function Dj() {
47 local start=`pwd`
48 for i in $(seq 1 5);do
49 if test -f manage.py;then
50 python manage.py $@
51 break
52 fi
53 done
54}
55function Gupdate() {
56 local start=`pwd`
57 cd ~/.ghost && git pull
58 Source
59 cd $start
60}