Skip to main content

Bash history command colorized on levenshtein distance of last 10 commands

Project description

Bash history command colorized on levenshtein distance of last 10 commands

The history command is measured against the previous command in the list and it it’s the same or almost the same it’s printed in grey. Duplicates are also grey.

###.bash_profile

# Avoid duplicates
export HISTCONTROL=ignoredups:erasedups

# When the shell exits, append to the history file instead of overwriting it
shopt -s histappend

# After each command, append to the history file and reread it
export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"

#alias to script
alias hist='python ~/workspace/history/history.py'

screenshot

history

history

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

historybash-22.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file historybash-22.tar.gz.

File metadata

  • Download URL: historybash-22.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for historybash-22.tar.gz
Algorithm Hash digest
SHA256 7693dffef69314cbaa9fe2f4837dbb4834568eb0c3ef5130d7ff5e6e4a7e1036
MD5 9520032b8dcf2c70a8e8d19a2cfa85a0
BLAKE2b-256 aea37aa1d071daa4ace89f7f1c05e31155730e9f38317239fe45f40e78da976b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page