Merge pull request #12 from MichaelAquilina/next

Release 0.3.0
This commit is contained in:
Michael Aquilina 2019-07-18 10:35:00 +01:00 committed by GitHub
commit 8b0ae499a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View file

@ -1,6 +1,10 @@
Changelog for zsh-auto-notify Changelog for zsh-auto-notify
============================= =============================
0.3.0
-----
* Add support for environments where standard history is disabled. Fixed in #10
0.2.0 0.2.0
----- -----
* Initial stable release * Initial stable release

View file

@ -1,4 +1,4 @@
export AUTO_NOTIFY_VERSION="0.2.0" export AUTO_NOTIFY_VERSION="0.3.0"
# 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 export AUTO_NOTIFY_THRESHOLD=10
@ -63,7 +63,10 @@ function _auto_notify_send() {
} }
function _auto_notify_track() { function _auto_notify_track() {
AUTO_COMMAND="$1" # $1 is the string the user typed, but only when history is enabled
# $2 is a single-line, size-limited version of the command that is always available
# To still do something useful when history is disabled, although with reduced functionality, fall back to $2 when $1 is empty
AUTO_COMMAND="${1:-$2}"
AUTO_COMMAND_FULL="$3" AUTO_COMMAND_FULL="$3"
AUTO_COMMAND_START="$(date +"%s")" AUTO_COMMAND_START="$(date +"%s")"
} }