- If you are already an existing user (v1.0.0), please remove the
sh
file like this:
rm -v "$HOME/bin/sh"
sudo rm -v "/usr/local/bin/sh"
This will resolve the conflicts you may have with dash
in shell. Then kindly follow the unistall section before continuing.
- To install as new user or existing user for v1.0.0 (who followed the instructions above):
git clone https://github.com/AbdourahamaneIssakaSani/holberton-autocreate.git && cd holberton-autocreate && ./install
After the installation process, type the following command:
ha
If you face permission denied error, run one of these commands and retry
source ~/.profile
or
source ~/.bashrc
-
push your file to GitHub
You can achieve this with the
pu
command. Typepu -h
to know more. Find examples below:- to commit and push all files you changed, just type
pu
- to commit and push a single file called
file1
pu file1
- to commit and push the files
file1
andfile2
(as many files as you want)
pu file1 file2
A default commit message is provided. To override it, use
-m=MESSAGE
option like this:pu -m "custom commit message"
or with the specific file
pu -m "custom commit message" file1
-
Create a javascript file
To create a javascript file with
execute rights
and starting with#!/usr/bin/node
, use thejs
command. Typejs -h
to know more. Find examples below:- to create the file named
0-rectangle.js
js 0-rectangle.js
- to create the file named
0-rectangle.js
and open it in insert mode, use-o
option (only for on file)
js -o 0-rectangle.js
- to create the files named
0-rectangle.js
and1-rectangle.js
(as many files as you want)
js 0-rectangle.js 1-rectangle.js
- to create the file named
-
Create a python file
To create a python file with
execute rights
and starting with#!/usr/bin/python3
, use thepy
command. Typepy -h
to know more. Find examples below:- to create the file named
0-square.py
py 0-square.py
- to create the file named
0-square.py
and open it in insert mode, use-o
option (only for on file)
py -o 0-square.py
- to create the files named
0-square.py
and1-square.py
(as many files as you want)
py 0-square.py 1-square.py
- to create the file named
-
Create a bash file
To create a bash file with
execute rights
and starting with#!/bin/bash
, use themh
command. Typemh -h
to know more. Find examples below:- to create the file named
0-current_working_directory
mh 0-current_working_directory
- to create the file named
0-current_working_directory
and open it in insert mode, use-o
option (only for on file)
mh -o 0-current_working_directory
- to create the files named
0-current_working_directory
and1-listit
(as many files as you want)
mh 0-current_working_directory 1-listit
- to create the file named
-
Create an env bash file
To create a bash file with
execute rights
and starting with#!/usr/bin/env bash
, use thevh
command. Typevh -h
to know more. Find examples below:- to create the file named
1-for_best_school
mh 1-for_best_school
- to create the file named
1-for_best_school
and open it in insert mode, use-o
option (only for on file)
mh -o 1-for_best_school
- to create the files named
1-for_best_school
and2-while_best_school
(as many files as you want)
mh 1-for_best_school 2-while_best_school
- to create the file named
If you want to remove all commands of Holberton autocreate, you can remove the files ha
, pu
, js
, py
, mh
, vh
located in ~/bin
AND /usr/local/bin
directories and type
in your terminal
source ~/.profile
or go in the repository folder holberton-autocreate
and type the following:
./uninstall
I created this project for African Leadership University and ALX Africa students or anyone taking the Holberton School Program of Software Engineering. Using it will help you save at least 60% of your time by preventing you from typing some commands irrelevant to the learning objective. That is why I do not recommend it to someone who is not yet familiar with the shebang, chmod
, git add
, git commit
, git push
. Use it if you have passed the assessment Shell - Processes & Signals. - Abissa