All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to the Haskell Package Versioning Policy.
Note that PVP is applied to the application, not the library. That is, the major/minor/patch definitions apply to the application's interface / usage (e.g. cli args, config file), not the library.
For those unfamiliar with PVP, it is essentially
SemVer, except the PVP major version is
the first two components (e.g. 0.9
in 0.9.1
), and PVP has no exception
for versions < 1.
- Add
--file-log-mode rename
, that renames the requested log file if it already exists. E.g.-f shrun.log
becomesshrun (1).log
.
0.9.1 -- 2024-07-27
- Updated blessed GHC to 9.8.2.
- Add
--command-log-read-strategy (command-log.read-strategy)
option that allows for line buffering. - Add
--command-log-buffer-length
and--command-log-buffer-timeout
options for use with--command-log-read-strategy block-line-buffer
. - Added GHC 9.10 support.
- Line truncation
detect
option now subtracts one, so terminals do not add an extra newline. - More
HasCallStack
annotations for better callstacks in case something goes wrong. - Increase default
--command-log-read-size
to16 kb
to better prevent command log splitting. - Improved formatting. Leading/trailing whitespace is no longer stripped from file logs, so original formatting is preserved.
- Simplify reading final error message.
- Hide
--version
from primary usage section.
0.9 -- 2024-05-10
--notify-action command
(notify.action = "command"
) no longer implies--notify-action final
. There is a new option--notify-action all
for that.--file-log-size-mode
now defaults towarn 50 mb
(i.e. warn when the log file exceeds 50 mb). There is a new optionnothing
to disable this.- Extensive CLI/toml option changes/renaming:
--key-hide
:- CLI:
--common-log-key-hide
. - Toml:
common-log.key-hide
. -k
removed.
- CLI:
--timer-format
:- CLI:
--console-log-timer-format
. - Toml:
console-log.timer-format
.
- CLI:
--poll-interval
:- CLI:
--command-log-poll-interval
. - Toml:
command-log.poll-interval
. -p
removed.
- CLI:
--cmd-log
:- CLI:
--console-log-command
. - Toml:
console-log.command
. -l
removed.
- CLI:
--cmd-name-trunc
:- CLI:
--console-log-command-name-trunc
. - Toml:
console-log.command-name-trunc
. -x
removed.- Applies to all console logs, not just command logs.
- CLI:
--cmd-log-line-trunc
:- CLI:
--console-log-line-trunc
. -y
removed.- Toml:
console-log.line-trunc
.
- CLI:
--cmd-log-strip-control
:- CLI:
--console-log-strip-control
. - Toml:
console-log.strip-control
. -s
removed.
- CLI:
- Added stack support back.
- New option
--command-log-read-size
(toml:command-log.read-size
) that controls the size of logs we read from command with--console-cmd-log
and--file-log
. - New option
--file-log-command-name-trunc
(toml:file-log.command-name-trunc
) for command name truncation in the file logs. - New option
--file-log-delete-on-success
(toml:file-log.delete-on-success
) that deletes the log file upon a successful exit. - New option
--file-log-line-trunc
(toml:file-log.line-trunc
) for line truncation in the file logs. - Options taking
NATURAL
numbers now allow underscore separators.
- Improved
strip-control
optionsall
andsmart
to replace newlines with a single whitespace, rather than stripping them. - Notification failures are no longer swallowed; errors do not kill shrun, but they are logged and cause the program to exit with a failure code.
- Fixed bug where
--notify-system notify-send
failed when given legend commands containing quotes and--log-key-hide
was active.
0.8.1 -- 2023-12-08
- Default log renamed from
XDG_STATE/shrun/log
toXDG_STATE/shrun/shrun.log
.
- Added feature for sending notifications upon command/shrun completion.
The new CLI options (
toml
) are:--notify-action (notify.action)
--notify-system (notify.system)
--notify-timeout (notify.timeout)
- Added new (
--timer-format
/timer-format
) feature for formatting the timer. Options are:digital_compact
digital_full
prose_compact
prose_full
- Add
no-x
options to allow selectively disabling options (e.g. disable a single field set by the toml file).
- Fixed bug where command logs with newlines in them were rendered in the same log. These are now split across multiple logs.
- Help page improved.
0.8 -- 2023-03-22
stack
support removed.
- If any commands fail, shrun now exits with an error code. Previously, shrun would exit successfully in this scenario, returning an exit code only when shrun itself died.
- Similarly, error code is now set if any commands time out.
- File logging now respects
--key-hide
i.e. default behavior matches--cmd-log
and prints the key name over the literal command. - We now default logging to the XDG State directory rather than XDG config
i.e.
~/.local/state/shrun/log
.
--init
(toml:init
) option that allows one to specify logic that should be run before each command. This can be useful when we want to load functions/aliases e.g.shrun --init ". ~/.bashrc" foo
.osx
support.
- File logs are now streamed, do not buffer.
- Previously, if
--cmd-log
or--file-log
were specified, then a CPU thread would be maxed out polling commands for logs. We have now set a delay, defaulting to 10,000 microseconds, to keep the CPU reasonable. This value can be configured through the new--poll-interval
option.
0.7 -- 2022-12-19
log-disable
option removed from CLI and TOML.
- Logs
- Slightly more compact now (spaces between labels removed)
- Success/Finished message now have specific labels
- Timer logs not sent to file
- Fixed bug where legend key with multiple values i.e.
k = [v1, v2, ...]
would consider eachvi
to have key namek
. This meant output could be ambiguous withkey-hide = false
(the default) because multiple values would have the same key name. Now we only consider a value to have a key name when it is unique i.e.k = v
. - File logging thread no longer polls when file logging is disabled.
- File logging no longer crashes if the log file does not already exist.
- Final log message now consistently show up in the log file.
- Fixed bug where ansi control chars could "bleed" over into other logs
- Control chars stripped from command names every time.
- Fixed bug where the toml file's
cmd-log.line-trunc
andstrip-control.cmd-log
were not overridden by the CLI unless the CLI also specified--cmd-log
.
0.6 -- 2022-12-07
- CLI
cmd-line-trunc
renamed tocmd-log-line-trunc
.strip-control
renamed tocmd-log-strip-control
.disable-log
renamed tolog-disable
.
- TOML
- Commands logging is now part of the table
cmd-log
.cmd-line-trunc
renamed tocmd-log.line-trunc
.strip-control
renamed tocmd-log.strip-control
.
- File logging is now part of the table
file-log
.file-log
renamed tofile-log.path
.file-log-mode
renamed tofile-log.mode
.file-log-strip-control
renamed tofile-log.strip-control
.
- Commands logging is now part of the table
- Timestamps in logs are now simpler: No timezone or fractions of a second.
- Fix redundant COMMANDS... on help page.
0.5 -- 2022-08-08
- Renamed executable from
shell-run
toshrun
. - Added toml configuration. This subsumes the old
--legend
file, as that is part of the new toml file. --key-show
is now the default behavior. The flag has thus been renamed--key-hide
, and is off by default.--file-log
no longer interpretsd
as the default path. Only the stringdefault
is expected.- Renamed toml's
--file-logging
to--file-log
for consistency with CLI.
--file-log-strip-control
for adding--strip-control
functionality to file logs.--file-log-mode
option for choosing betweenappend
andwrite
file modes.--file-log-size-mode
option for warning or automatically deleting the log file if it crosses a user-specified threshold.
- Improve
--strip-control
.all
should no longer leave ansi remnants, andsmart
is much more aggressive about removing everything but harmless styling. - Improve benchmarking to more accurately describe memory usage.
- File logging handled more intelligently: no longer opening/closing on each write.
0.4 -- 2022-06-21
- File logging in local time, not UTC.
- Improved integration tests.
0.3 -- 2022-05-28
- Add new
--strip-control
argument for handling control chars in logs.
0.2.0.1 -- 2022-05-24
- Update CI jobs
- Performance improvements
- Documentation
0.2 -- 2022-05-11
- Update default legend: legend.txt -> shrun.legend
- Update default logs: logs.txt -> shrun.log
0.1 -- 2022-04-03
- First version. Released on an unsuspecting world.