Skip to content
Tadej Panjtar edited this page Nov 1, 2019 · 3 revisions

Modes

Special tasks are organized in so called “modes“.

Development

Mode for programmers common tasks. They are divided to subcommands for every programming language.

cc - c/c++

Cr- Compile and run, standalone file is first argument

Cr example1.cpp
Compiling example1.cpp and running example1
Hello World!

js - javascript

I - Installing node module and save it to package.json

I express cookie-parser

I - Installing node module and save it to package.json under development section

Id nodemon

nvm - nodejs version manager

nvm install v13.0.1
# use it
nvm deactivate v13.0.1
nvm uninstall v13.0.1
nvm cache clear

py - python

pkg

Package (un)installing and service administrating.

pkg SubCommand Description
I automatically installs package(s) and dependencies
i installs package(s) and dependencies
U automatically uninstall package(s)
u uninstall package(s)
S service command (start, stop, .. )
se search package(s)
q obtain info about package

SCM

Source Code Managment is mode for dealing with sourses. This module starts also automatically when in SCM folder.

SCM SubCommand Description
bzr Canonical bazar
git Linus Torvalds' git
hg Mercurial
svn Subversion

Usage

Autocompletions

bash4all uses autocompletions whenever is possible.

For modes

mode p<Tab><Tab>
# will autocomplete mode pkg
mode pkg

Or with subparameters:

mode scm s<Tab><Tab>
# will autocomplete
mode scm svn

For aliases

(in mode pkg)

I mer<Tab><Tab>
# will autocomplete
I mercurial

User customizations of installation

By writting commands to .bash4all_install you can extend the bas4all installation. But be aware that only pkg mode is available.

Simple automated

You can also easily customize / extend the installation to meet your needs. Just before installation add custom commands to special file. E.g. # installs also cowsay package

echo I cowsay > ~/.bash4all_install

Advanced install

cat > ~/.bash4all_install << EOF
# manal installation because not in repository
[ "\$BASED" = BSD ] && I py36-pip && sudo pip install asciinema
[ "\$BASED" = MAGEIA ]  && I python3-pip && pip3 install asciinema
I asciinema # try install from repository
EOF
Clone this wiki locally