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 Semantic Versioning.
- dropping maven-gpg-plugin
- prompt with git branch, hostname and username (#121)
- still not configurable, better than nothing... :-)
- experimental support for sending records without buffering
- forward compatibility with JDK21
- documentation about the internals (see INTERNAL.md).
- JDK17 is the minimum requirement
- replaced references to "Alphanum" with "Natural Sort Order" as the original website is gone
- replaced jline JNA with JNI
- final hosh.jar is much smaller (3.2MB -> 1.4MB)
- watch:
- regression on "watch directory"
- sending records as soon as possible in the interactive shell
- JDK11 support
- old workaround class IgnoreWindowsUACExceptions for UAC exceptions in Windows 7
hosh.spi.Printable
class was replaced byshow
method- it was really a bad design choice to use
PrintWriter
- it was really a bad design choice to use
- catching up with dependencies since 2021 (thanks @dependabot!)
- restored sonarcloud.io setup
- removed vestigial files and examples
-
lambda does not allow wrapper or pipeline anymore, only simple command invocations.
For example:
ls | { path -> walk ${path} | sum size }
is invalid now wherels | { path -> echo ${path}
is still valid
- bumped jline to 3.20
- skipping autocomplete of commands when current line is not empty
- improving Dockerfile
- build from source in a consistent environment
- fetch dependencies in a separate step (for caching!)
- use multi-stage builds to remove build dependencies
- JDK 16 compatibility
waitSuccess
: runs nested command until first success inspired by https://medium.com/@marko.luksa/bash-trick-repeat-last-command-until-success-750a61c43c8awithTimeout
: runs nested command with a timeout inspired by https://www.cyberciti.biz/faq/linux-run-a-command-with-a-time-limit/- new infrastructure for
cmd { ... }
- JDK 15 compatibility
- bumped jline to 3.17.1
sleep
: removed 2 args overload now it is possible to specify duration with both ISO8601 format and with our custom format (just dropping PT prefix)sleep PT1s
,sleep 1s
andsleep 1S
are equivalent.
http
: improving error handling- always destroy underlying native process on InterruptedException
- (preview feature) hosh interprets the command line as it is typed and uses syntax highlighting to provide feedback to
the user.
Potential errors, that are marked in bold red, include:
- any syntax error
- invalid commands (both built-in and external)
path
: new command to avoid text-based manipulation of PATH variablepath show
to show all elements of current PATHpath clear
to remove all elements of current PATHpath append /usr/local/bin
to add/usr/local/bin
as last element of current PATHpath prepend /usr/local/bin
to add/usr/local/bin
as first element of current PATH
- bumped jline to 3.16.0
- fixed regression in
ls | sum size
- #265: raspberry pi 4 support
freq
: new command to replace pattern 'sort | uniq -c | sort -rn' (see example examples/visitors.hosh)last
: new command similar to 'tail -n'max
,min
: calculate max and min value, works for any value (e.g. timestamp, numeric, strings)sum
: supports size and numeric valuesconfirm
: ask a question and wait for user confirmationls
: adding creation, modification and last access timels
: removing ANSI coloring (to be reimplemented later)walk
:- follow symlinks by default
- revert 'fail fast' error handling
- changed
groupId
in maven dfa1 ->hosh
http
: integration tests (https://postman-echo.com)sort
: consistent order of argumentskey
is mandatory and always in first positionasc
,desc
are optional and always in second position
table
: merged as "autotable" in interactive mode
probe
: fix exit status when content type cannot be determined- minor fixes
- ignoring UAC errors in test on Windows
- stability of integration tests
- sign jar file with GPG when deploy on GitHub
ls
: adding mtime, atime and ctime
- introducing Java modules
walk
: 'fail fast' error handling- removing automatic semicolon insertion
- improved error handling of lambda
- fix race condition in
PipelineChannel
- preliminary support for Flight Recorder (JEP 328)
- custom events for command executions
- improved
location
while usingHOSH_LOG
as well
- improved handling of strings
- #205: ability to use '{' (any other character in strings)
- now it is possible to use
glob '*.{java,jar}'
and much more
- now it is possible to use
- lambda command
- alternative to glob expansion
command | { size -> ...
binding ofsize
variable for each incoming record
- using alphanum for generic text too
- new
sort
features:sort asc key
sort desc key
- improved design of
Values.none()
- switched back to jansi: final jar now is 1.3MB instead of 2.5MB
- azure-pipelines -> github-actions
- enabling parallel test execution
- preliminary introduction of java-module.info
- #212: now it is possible to use several external commands at once in a pipeline
glob
for glob pattern matching- works as generic filter for any record with
path
key - e.g.
walk . | glob '*.java
- works as generic filter for any record with
- "on demand" record creation
- e.g.
ls | take 1
does only 1 read access to the file system - noticeable performance penalty
- e.g.
find
has been renamed towalk
- added
size
key, enabling to quickly find the largest file by doingwalk . | sort size
- added
- storing history in
$HOME/.hosh_history
instead of `$HOME/.hosh.history - dropping trailing spaces during PATH init to avoid
java.nio.file.InvalidPathException
- improving path normalization (e.g.
c:\\vagrant
into\\vboxsrv
)
- improved
sleep
with additional "unit" e.g.:sleep 15 minutes
now it is validsleep PT15M
now it is valid too (https://en.wikipedia.org/wiki/ISO_8601#Durations)
- updated dependencies by enabling https://dependabot.com/
- ensuring that
withLock
removes lock file
- ANSI colors in log file
- command line options --help and --version
- improved history support (fix #147)
- split
Channel
interface (fix #152) InputChannel.iterate()
API (fix #116)
- NPE when starting without PATH (fix #147)
- introducing
withLock
wrapper - introducing
join
command - introducing
sum
command - improved error messages by using command name prefix (fix #88)
- multiline pipelines (fix #83)
- allowing sequence commands everywhere (fix #130)
- fix symlink support in
ls
- variable expansion with fallback
echo ${VAR!hello}
expands to'hello'
when VAR is not defined
- new command
resolve
- similar to
readlink -f
orrealpath
- similar to
- new command
input
andsecret
input FOO
for saving non-secure user input into a variablesecure FOO' like
input` but masking input
- commands must be terminated with ';'
- script are backward-compatible because Hosh is automatically ending every line with ';'
- this allows sequence of commands like
ls ; ls
- new command 'http':
- GET only
- HTTP 1.1/2.0
- detect system proxy
- new command 'trim'
- new commands: 'cp', 'mv', 'rm'
- no recursion yet
- no directory operation yet, only files
- no overwrites
- new command: 'partitions'
- new command: 'probe'
- new command: 'symlink', 'hardlink'
- auto-complete of any executable in PATH
- JUnit 4.x -> 5.x
- removed command 'source'
- 100% built-in commands documented with help and examples
- improved test coverage (thanks @pitest)
- new command 'regex', basically named groups regular expressions to record
- new command 'network', to display all network interfaces in this system
- introducing annotation-based help system
- improving auto-complete of partially specified directories
- new system commands:
- 'capture' low-level command for implementing later $()
- 'open' low-level command for implementing later 'cmd > file' and 'cmd >> file'
- 'watch' preliminary version for watching file-system changes
- 'timestamp' to insert a timestamp into each incoming record
- 'table' has been colorized
- new system commands: 'set' and 'unset'
- new text commands: 'distinct' and 'duplicated'
- auto-completion of variable expansion, triggered by '${'
- improved auto-completion of directories
- introducing docker support
- support for 'PATHEXT' in Windows
- 'PipelineCommand' has been polished
- improved Windows support
- resolution of external commands such as "java" will be attempted as "java" then "java.exe"
- test suite now is compatible with windows
- using jline-jna instead of jline-jansi
- 'source' and 'sink' commands
- improved ctrl-C handling (#44)
- migrated from SLF4J to JUL
- introduced 'table' command: 'ls | table' for a bit nicer output
- introduced 'benchmark' command (lots of sharp edges)
- detecting and reporting extraneous '}' at the end of statement
- follow symlinks when target of 'find' and 'ls' are symlinks
- generalized pipelines e.g. 'ls | drop 1 | take 1 | count'
- more powerful grammar e.g. nested wrapper, wrapper of pipeline
- Java commands can pipe data into native commands e.g. 'lines pom.xml | /usr/bin/wc -l'
- 'cat' has been renamed to 'lines'
- preliminary ctrl-C support
- allowing string in double quotes ""
- new command 'count'
- improved memory usage
- introducing pipe operator (i.e. ls | sort name) just for 2 commands and some commands like 'enumerate', 'sort', 'filter', 'take', 'drop'
- using alphanum to sort paths
rand
: infinite stream of random integers
- Hosh now requires Java 11
- lazy resolving variables at runtime
- removing glob pattern from 'find' (the idea is to use pipelines to filter paths)
- 'ps' command
- 'kill' command
- 'quit' as alias of 'exit'
- 'find' command
- use jline-jansi
- improved 'ls' command
- improved humanized size
- improved windows support
- maven wrapper support
- fixed 'exit' in REPL
- nice exit handling: hosh now behaves like 'set -e' in bash
- enable logging by defining OS env HOSH_LOG_LEVEL, OFF by default
- dropped logback, final uberjar is ~600KB smaller
- README.md, LICENSE.md, CHANGELOG.md into uberjar
- ExitStatus API
- 'sleep millis' command
- naive filesystem completer
- external commands absolute path
- external commands