Skip to content
This repository was archived by the owner on May 13, 2026. It is now read-only.

MohamedElashri/shell-timestamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Shell History Timestamper

This utility script enables or disables timestamped command history for Bash and Zsh shells. It does so by managing a single .history_config file in your home directory and ensuring your shell configuration files (.bashrc and .zshrc) source it.

What It Does

  • Ensures every command you run in Bash or Zsh is saved with an execution timestamp.
  • Keeps your shell configuration clean by isolating all related settings in .history_config.
  • Makes activation and removal fully reversible and idempotent.

Usage

  1. Download and make the script executable:

    chmod +x shell-timestamp.sh
  2. To enable timestamped history, run:

    ./shell-timestamp.sh install
  3. To disable and fully remove the configuration, run:

    ./shell-timestamp.sh uninstall
  4. After installing or uninstalling, restart your shell or run:

    source ~/.bashrc

    or

    source ~/.zshrc

    to apply changes immediately.

Notes

  • The script will not overwrite your existing shell configuration or history settings; it only adds or removes a dedicated sourcing block and config file.
  • Existing history files are not modified; only new history entries will include timestamps after installation.

About

time stamping commands in shell history

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages