Merge pull request #36 from spikespaz/master

Fix the environment variables being reset upon sourcing the plugin
This commit is contained in:
Michael Aquilina 2022-02-21 10:28:22 +00:00 committed by GitHub
commit 30c3c60939
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,13 +1,27 @@
export AUTO_NOTIFY_VERSION="0.8.0" export AUTO_NOTIFY_VERSION="0.8.0"
# Time it takes for a notification to expire # Time it takes for a notification to expire
export AUTO_NOTIFY_EXPIRE_TIME=8000 [[ -z "$AUTO_NOTIFY_EXPIRE_TIME" ]] &&
export AUTO_NOTIFY_EXPIRE_TIME=8000
# Threshold in seconds for when to automatically show a notification # Threshold in seconds for when to automatically show a notification
export AUTO_NOTIFY_THRESHOLD=10 [[ -z "$AUTO_NOTIFY_THRESHOLD" ]] &&
export AUTO_NOTIFY_THRESHOLD=10
# List of commands/programs to ignore sending notifications for # List of commands/programs to ignore sending notifications for
export AUTO_NOTIFY_IGNORE=( [[ -z "$AUTO_NOTIFY_IGNORE" ]] &&
"vim" "nvim" "less" "more" "man" "tig" "watch" "git commit" "top" "htop" "ssh" "nano" export AUTO_NOTIFY_IGNORE=(
) 'vim'
'nvim'
'less'
'more'
'man'
'tig'
'watch'
'git commit'
'top'
'htop'
'ssh'
'nano'
)
function _auto_notify_format() { function _auto_notify_format() {
local MESSAGE="$1" local MESSAGE="$1"