Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

bmoneill/habit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

habit: Break bad habits in the terminal

This is a script to help you break bad habits when using the terminal. Upon running a command with habit, you will be prompted to see if you have addressed all possible concerns/prerequisites before the command is executed.

Installing

sudo make install

Usage

Habit is mainly designed to be used in Bash aliases. After installing, put something like the following in ~/.config/habits.csv:

COMMAND,MESSAGE
git,Make sure you are on the right branch
git,Make sure your commit message is descriptive
git,Make sure your code works
rm,Make sure you really want to remove these files!

Modify your .bashrc:

alias git="habit git"
alias rm="habit rm"

Habit will now prompt you every time you run the command:

$ git commit
habit:
 - Make sure you are on the right branch
 - Make sure your commit message is descriptive
 - Make sure the project builds
Did you address these concerns? (y/n):

License

Copyright (c) 2025 Ben O'Neill [email protected]. This work is released under the terms of the MIT License. See LICENSE for the license terms.

About

Break bad habits in the terminal

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published