A combination of vim and bash that I find useful
no need for quotes on commit
1 file changed, +7 -4
+7-4ghost.sh
| @@ -14,10 +14,14 @@ alias Gbash='vim ~/.ghost/ghost.sh' | ||
| 14 | 14 | alias clip=clip.exe |
| 15 | 15 | alias Bash='vim ~/.bashrc' |
| 16 | 16 | alias Source='source ~/.bashrc' |
| 17 | -alias gcom='git add . && git commit -m' | |
| 18 | 17 | alias ghook='~/.ghost/ghook/startproject.sh' |
| 19 | 18 | alias venv='python -m venv venv' |
| 20 | 19 | alias Gsecret='vim ~/.ghost/secret.sh' |
| 20 | +function gcom { | |
| 21 | + local message=$@ | |
| 22 | + echo "$message" | |
| 23 | + git add . && git commit -m "$message" | |
| 24 | +} | |
| 21 | 25 | function vsource() { |
| 22 | 26 | local start=`pwd` |
| 23 | 27 | for i in $(seq 1 5);do |
| @@ -31,9 +35,8 @@ function vsource() { | ||
| 31 | 35 | } |
| 32 | 36 | function Gpush() { |
| 33 | 37 | local start=`pwd` |
| 34 | - local message=$@ | |
| 35 | 38 | cd ~/.ghost |
| 36 | - gcom "$message" | |
| 39 | + gcom $@ | |
| 37 | 40 | git push -u origin main |
| 38 | 41 | cd $start |
| 39 | 42 | } |
| @@ -75,5 +78,5 @@ function redis { | ||
| 75 | 78 | docker run -p 6379:6379 --name redis -d redis:5 |
| 76 | 79 | } |
| 77 | 80 | function redis-cli { |
| 78 | - docker exec -it redis redis-cli | |
| 81 | + docker exec -it redis redis-cli $@ | |
| 79 | 82 | } |