├── .bash_profile ├── .bashrc ├── LICENSE ├── README.md ├── bash-alias ├── apm ├── bn ├── laravel ├── npm └── yarn ├── bash-code └── hi ├── bash-now-rm.sh ├── install.sh └── uninstall.sh /.bash_profile: -------------------------------------------------------------------------------- 1 | # mode status 2 | # bash -l 3 | echo "Bash Now by @code4mk" 4 | echo "This ia active mode bash_profile" 5 | 6 | # bash-code directory 7 | export Bash_Me=./bash-code 8 | export PATH=$Bash_Me:$PATH 9 | 10 | # combine bashrc 11 | if [ -f .bashrc ]; then 12 | . .bashrc; 13 | fi 14 | 15 | # all alias 16 | for file in ./bash-alias/*; do 17 | . ${file} 18 | done 19 | 20 | 21 | # bash-code execute permission 22 | for file in ./bash-code/*; do 23 | chmod +x ${file} 24 | done 25 | -------------------------------------------------------------------------------- /.bashrc: -------------------------------------------------------------------------------- 1 | # mode status 2 | # bash -i 3 | echo "This inactive mode bashrc" 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 @code4mk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | # bash-now 4 | bash shell setup 5 | 6 | # Install 7 | 8 | ```bash 9 | git clone --depth=1 https://github.com/code4mk/bash-now.git 10 | cd bash-now 11 | # with bash terminal 12 | ./install.sh 13 | # without bash terminal 14 | install.sh 15 | ``` 16 | 17 | # Uninstall 18 | 19 | ```bash 20 | cd bash-now 21 | # with bash terminal 22 | ./uninstall.sh 23 | # without bash terminal 24 | uninstall.sh 25 | ``` 26 | 27 | 28 | # Manual setup 29 | 30 | ```bash 31 | clone 32 | copy all inside bash-now directory 33 | paste inside your usr directory (linux) 34 | paste inside c/Users/your_name/ (windows) 35 | ``` 36 | 37 | NB: `.bashrc` & `.bash_profile` already have that time replace the file in the destination 38 | 39 | # bash_alias directory 40 | 41 | * `~/bash-alias` directory 42 | * [bash-it all alias here ](https://github.com/Bash-it/bash-it/tree/master/aliases/available) 43 | 44 | ```bash 45 | > all alias store here 46 | > you can add your alias file just name (no extension) 47 | # alias structure 48 | alias bncmp='composer' 49 | ``` 50 | 51 | # How run alias 52 | 53 | ```bash 54 | > go to terminal 55 | > bash -l 56 | > me 57 | # username 58 | # stay with bash -l 59 | ``` 60 | 61 | # laravel all alias 62 | 63 | ```bash 64 | a.read 65 | ``` 66 | 67 | # yarn all alias 68 | 69 | ```bash 70 | y.read 71 | ``` 72 | 73 | # npm all alias 74 | 75 | ```bash 76 | n.read 77 | ``` 78 | # apm /atom all alias 79 | 80 | ```bash 81 | atm.read 82 | ``` 83 | 84 | # bash coding 85 | 86 | * `~/bash-coding` directory 87 | 88 | ```bash 89 | #without extension 90 | > create file inside bash_coding directory 91 | > go to terminal 92 | > bash -l 93 | # test hit >> hi 94 | > file_name (no extension) 95 | ``` 96 | 97 | * NB: your previous bashrc will be cached in `~/bash-default` 98 | 99 | # Author 100 | 101 | * [@code4mk](https://twitter.com/code4mk) 102 | * [code4mk.org](https://code4mk.org) 103 | -------------------------------------------------------------------------------- /bash-alias/apm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #------------------------------ 3 | # 0dev 4 | # Software development comapny 5 | # https://odev.co 6 | #------------------------------ 7 | 8 | # atom/apm alias >> @code4mk 9 | alias atm.read='cat ~/bash-alias/apm' 10 | alias atm.l='apm login' 11 | alias atm.publish='apm publish' 12 | alias atm.unpub='apm unpublish' 13 | alias atm.out='apm outdated' 14 | alias atm.up='apm update' 15 | -------------------------------------------------------------------------------- /bash-alias/bn: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #------------------------------ 3 | # 0dev 4 | # Software development comapny 5 | # https://odev.co 6 | #------------------------------ 7 | 8 | # bash-now default alias >> @code4mk 9 | 10 | alias me='whoami' 11 | alias live='live-server' 12 | alias 0='clear' 13 | -------------------------------------------------------------------------------- /bash-alias/laravel: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #------------------------------ 3 | # 0dev 4 | # Software development comapny 5 | # https://odev.co 6 | #------------------------------ 7 | 8 | # LARAVEL alias >> @code4mk 9 | 10 | # read laravel alias lists 11 | alias a.read='cat ~/bash-alias/laravel' 12 | # artisan core 13 | alias a.='php artisan' 14 | alias a.v='php artisan --version' 15 | alias a.ls='php artisan list' 16 | alias a.help='php artisan help' 17 | alias a.s='php artisan serve' 18 | alias a.up='php artisan up' 19 | alias a.down='php artisan down' 20 | alias a.new='laravel new' 21 | # key generate 22 | alias a.key='php artisan key:generate' 23 | # tinker 24 | alias a.tinker='php artisan tinker' 25 | # generating command 26 | alias a.m.command='php artisan make:command' 27 | # make auth 28 | alias a.m.auth='php artisan make:auth' 29 | # make authorization 30 | alias a.m.policy='php artisan make:policy' 31 | # make controller 32 | alias a.m.controller='php artisan make:controller' 33 | # route 34 | alias a.r.ls='php artisan route:list' 35 | alias a.r.cache='php artisan route:cache' 36 | alias a.r.clear='php artisan route:clear' 37 | # middleware 38 | alias a.m.ware='php artisan make:middleware' 39 | # eloquent model 40 | alias a.m.model='php artisan make:model' 41 | alias a.m.observer='php artisan make:observer' 42 | # database 43 | alias a.m.mg='php artisan make:migration' 44 | alias a.m.factory='php artisan make:factory' 45 | alias a.mg='php artisan migrate' 46 | alias a.mg.install='php artisan migrate:install' 47 | alias a.mg.fresh='php artisan migrate:fresh' 48 | alias a.mg.refresh='php artisan migrate:refresh' 49 | alias a.mg.reset='php artisan migrate:reset' 50 | alias a.mg.rollback='php artisan migrate:rollback' 51 | alias a.mg.status='php artisan migrate:status' 52 | # frontend 53 | alias a.preset='php artisan preset' 54 | alias a.view='php artisan view:clear' 55 | # resource 56 | alias a.m.resource='php artisan make:resource' 57 | # file system 58 | alias a.storage='php artisan storage:link' 59 | # event 60 | alias a.event='php artisan event:generate' 61 | # mail 62 | alias a.m.mail='php artisan make:mail' 63 | # make 64 | alias a.m.exception='php artisan make:exception' 65 | alias a.m.job='php artisan make:job' 66 | alias a.m.listener='php artisan make:listener' 67 | alias a.m.provider='php artisan make:provider' 68 | alias a.m.request='php artisan make:request' 69 | alias a.m.rule='php artisan make:rule' 70 | alias a.m.seeder='php artisan make:seeder' 71 | alias a.m.test='php artisan make:test' 72 | # notification 73 | alias a.m.noti='php artisan make:notification' 74 | alias a.noti='php artisan notifications:table' 75 | # cache 76 | alias a.ca.clear='php artisan cache:clear' 77 | alias a.ca.forget='php artisan cache:forget' 78 | alias a.ca.table='php artisan cache:table' 79 | # schedule 80 | alias a.schedule='php artisan schedule:run' 81 | # queue 82 | alias a.q.fail='php artisan queue:failed' 83 | alias a.q.fail.t='php artisan queue:failed-table' 84 | alias a.q.flush='php artisan queue:flush' 85 | alias a.q.forget='php artisan queue:forget' 86 | alias a.q.listen='php artisan queue:listen' 87 | alias a.q.restart='php artisan queue:restart' 88 | alias a.q.retry='php artisan queue:retry' 89 | alias a.q.table='php artisan queue:table' 90 | alias a.q.work='php artisan queue:work' 91 | #session 92 | alias a.ses='php artisan session:table' 93 | # vendor 94 | alias a.vendor='php artisan vendor:publish' 95 | # deployment 96 | alias a.cf.cache='php artisan config:cache' 97 | alias a.cf.clear='php artisan config:cache' 98 | 99 | # composer 100 | alias cm.='composer' 101 | alias cm.v='composer --version' 102 | alias cm.help='composer --help' 103 | alias cm.create='composer create-project' 104 | alias cm.in='composer install' 105 | alias cm.remove='composer remove' 106 | alias cm.out='composer outdated' 107 | alias cm.up='composer update' 108 | alias cm.ini='composer init' 109 | alias cm.dump='composer dump-autoload' 110 | alias cm.cache='composer clear-cache' 111 | alias cm.r='composer require' 112 | alias cm.g.r='composer global require' 113 | -------------------------------------------------------------------------------- /bash-alias/npm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #------------------------------ 3 | # 0dev 4 | # Software development comapny 5 | # https://odev.co 6 | #------------------------------ 7 | # npm alias >> @code4mk 8 | 9 | # default alias 10 | alias n.read='cat ~/bash-alias/npm' 11 | alias n.v='npm -v ' 12 | alias n..v='node -v' 13 | # basic alias 14 | alias n..='node' 15 | alias n.='npm' 16 | alias n.help='npm -h' 17 | alias n.au='npm adduser' 18 | alias n.o='npm logout' 19 | alias n.ini='npm init' 20 | alias n.in='npm install' 21 | alias n.g.in='npm -g install' 22 | alias n.unin='npm uninstall' 23 | alias n.ls='npm ls' 24 | alias n.out='npm outdated' 25 | alias n.up='npm update' 26 | alias n.pub='npm publish' 27 | alias n.unpub='npm unpublish' 28 | # script npm alias 29 | alias n.dev='npm run dev' 30 | alias n.build='npm run build' 31 | alias n.test='npm run test' 32 | -------------------------------------------------------------------------------- /bash-alias/yarn: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #------------------------------ 3 | # 0dev 4 | # Software development comapny 5 | # https://odev.co 6 | #------------------------------ 7 | 8 | # yarn alias >> @code4mk 9 | 10 | # default 11 | alias y.read='cat ~/bash-alias/yarn' 12 | # basic 13 | alias y.='yarn' 14 | alias y.help='yarn help' 15 | alias y.v='yarn --version' 16 | alias y.add='yarn add' 17 | alias y.remove='yarn remove' 18 | alias y.in='yarn install' 19 | alias y.g.add='yarn global add' 20 | alias y.g.remove='yarn global remove' 21 | alias y.l='yarn login' 22 | alias y.o='yarn logout' 23 | alias y.out='yarn outdated' 24 | alias y.up='yarn upgrade' 25 | alias y.g.up='yarn global upgrade' 26 | # script npm alias 27 | alias y.dev='yarn run dev' 28 | alias y.build='yarn run build' 29 | alias y.test='yarn run test' 30 | -------------------------------------------------------------------------------- /bash-code/hi: -------------------------------------------------------------------------------- 1 | status='Welcome Boss >> bash-now is running' 2 | echo "${status}" 3 | -------------------------------------------------------------------------------- /bash-now-rm.sh: -------------------------------------------------------------------------------- 1 | echo "Deleting bash-now main package" 2 | echo "Done Boss!" 3 | echo "https://github.com/code4mk/bash-now" 4 | if [ -d ~/bash-now ]; then 5 | rm -rf ~/bash-now 6 | fi 7 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | 2 | echo "bash-now is Installing..." 3 | 4 | if [ -d ~/bash-code ]; then 5 | echo "~/bash-code bash coding" 6 | else 7 | mkdir ~/bash-code 8 | fi 9 | 10 | if [ -d ~/bash-default ]; then 11 | echo "~/bash-default by default" 12 | else 13 | mkdir ~/bash-default 14 | fi 15 | 16 | if [ -d ~/bash-alias ]; then 17 | echo "~/bash-alias all aliases" 18 | else 19 | mkdir ~/bash-alias 20 | fi 21 | 22 | 23 | for file in ./bash-code/*; do 24 | cp $file ~/bash-code 25 | done 26 | 27 | for file in ./bash-alias/*; do 28 | cp $file ~/bash-alias 29 | done 30 | 31 | if [ -f ~/.bashrc ]; then 32 | mv ~/.bashrc ~/bash-default/.bashrc 33 | fi 34 | 35 | if [ -f ~/.bash_profile ]; then 36 | mv ~/.bash_profile ~/bash-default/.bash_profile 37 | fi 38 | 39 | 40 | cp ./.bashrc ~/.bashrc 41 | cp ./.bash_profile ~/.bash_profile 42 | cp ./rm-bash-now.sh ~/.rm-bash-now.sh 43 | echo "Done >> Thanks Boss" 44 | echo "Hit terminal -> bash -l" 45 | -------------------------------------------------------------------------------- /uninstall.sh: -------------------------------------------------------------------------------- 1 | echo "bash-now is uninstalling...." 2 | echo "Done Boss! >> Try again" 3 | echo "https://github.com/code4mk/bash-now" 4 | 5 | if [ -d ~/bash-code ]; then 6 | rm -rf ~/bash-code 7 | fi 8 | 9 | if [ -d ~/bash-default ]; then 10 | cp ~/bash-default/.bashrc ~/.bashrc 11 | cp ~/bash-default/.bash_profile ~/.bash_profile 12 | rm -rf ~/bash-default 13 | fi 14 | 15 | if [ -d ~/bash-alias ]; then 16 | rm -rf ~/bash-alias 17 | fi 18 | --------------------------------------------------------------------------------