- If you are already an existing user (v1.0.0), please remove the
shfile 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 && ./installAfter the installation process, type the following command:
haIf you face permission denied error, run one of these commands and retry
source ~/.profileor
source ~/.bashrc-
push your file to GitHub
You can achieve this with the
pucommand. Typepu -hto 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
file1andfile2(as many files as you want)
pu file1 file2
A default commit message is provided. To override it, use
-m=MESSAGEoption 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 rightsand starting with#!/usr/bin/node, use thejscommand. Typejs -hto know more. Find examples below:- to create the file named
0-rectangle.js
js 0-rectangle.js
- to create the file named
0-rectangle.jsand open it in insert mode, use-ooption (only for on file)
js -o 0-rectangle.js
- to create the files named
0-rectangle.jsand1-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 rightsand starting with#!/usr/bin/python3, use thepycommand. Typepy -hto know more. Find examples below:- to create the file named
0-square.py
py 0-square.py
- to create the file named
0-square.pyand open it in insert mode, use-ooption (only for on file)
py -o 0-square.py
- to create the files named
0-square.pyand1-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 rightsand starting with#!/bin/bash, use themhcommand. Typemh -hto 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_directoryand open it in insert mode, use-ooption (only for on file)
mh -o 0-current_working_directory
- to create the files named
0-current_working_directoryand1-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 rightsand starting with#!/usr/bin/env bash, use thevhcommand. Typevh -hto 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_schooland open it in insert mode, use-ooption (only for on file)
mh -o 1-for_best_school
- to create the files named
1-for_best_schooland2-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 ~/.profileor go in the repository folder holberton-autocreate and type the following:
./uninstallI 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