Skip to content

Commit

Permalink
Release 2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bensadeh committed Jan 8, 2024
1 parent a320424 commit 08b0480
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 23 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## 2.3.0

- `tailspin` now reads lines in chunks and highlights them in parallel. This should improve performance especially when
reading large files.
- `tailspin` now uses multiple threads to process lines in parallel
- Added `--bucket-size` flag to configure the number of lines to process in parallel
- Changed `-t,--tail` flag to `-e,--start-at-end` to avoid confusion with `tail -f`

## 2.2.0
Expand Down
12 changes: 8 additions & 4 deletions completions/tspin.bash
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ _tspin() {

case "${cmd}" in
tspin)
opts="-f -t -p -c -l -h -V --follow --tail --print --config-path --follow-command --words-red --words-green --words-yellow --words-blue --words-magenta --words-cyan --disable-builtin-keywords --disable-booleans --disable-severity --disable-rest --z-generate-shell-completions --bucket-size --help --version [FILE]"
opts="-f -e -p -c -l -h -V --follow --start-at-end --print --config-path --follow-command --words-red --words-green --words-yellow --words-blue --words-magenta --words-cyan --disable-builtin-keywords --disable-booleans --disable-severity --disable-rest --bucket-size --z-generate-shell-completions --help --version [FILE]"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
Expand Down Expand Up @@ -65,11 +65,11 @@ _tspin() {
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--z-generate-shell-completions)
--bucket-size)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--bucket-size)
--z-generate-shell-completions)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
Expand All @@ -83,4 +83,8 @@ _tspin() {
esac
}

complete -F _tspin -o nosort -o bashdefault -o default tspin
if [[ "${BASH_VERSINFO[0]}" -eq 4 && "${BASH_VERSINFO[1]}" -ge 4 || "${BASH_VERSINFO[0]}" -gt 4 ]]; then
complete -F _tspin -o nosort -o bashdefault -o default tspin
else
complete -F _tspin -o bashdefault -o default tspin
fi
10 changes: 5 additions & 5 deletions completions/tspin.fish
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
complete -c tspin -s c -l config-path -d 'Path to a custom configuration file' -r
complete -c tspin -s l -l follow-command -d 'Continuously listens to the stdout of the provided command and prevents interrupt events (Ctrl + C) from reaching the command' -r
complete -c tspin -s c -l config-path -d 'Provide a custom path to a configuration file' -r
complete -c tspin -s l -l follow-command -d 'Continuously listen to stdout from provided command and prevent interrupt events (Ctrl + C) from reaching the command' -r
complete -c tspin -l words-red -d 'Highlight the provided words in red' -r
complete -c tspin -l words-green -d 'Highlight the provided words in green' -r
complete -c tspin -l words-yellow -d 'Highlight the provided words in yellow' -r
complete -c tspin -l words-blue -d 'Highlight the provided words in blue' -r
complete -c tspin -l words-magenta -d 'Highlight the provided words in magenta' -r
complete -c tspin -l words-cyan -d 'Highlight the provided words in cyan' -r
complete -c tspin -l z-generate-shell-completions -d 'Print completions to stdout' -r
complete -c tspin -l bucket-size -d 'Set the bucket size for parallel processing' -r
complete -c tspin -s f -l follow -d 'Follow (tail) the contents of the file'
complete -c tspin -s t -l tail -d 'Start at the end of the file'
complete -c tspin -l z-generate-shell-completions -d 'Print completions to stdout' -r
complete -c tspin -s f -l follow -d 'Follow the contents of a file'
complete -c tspin -s e -l start-at-end -d 'Start at the end of the file'
complete -c tspin -s p -l print -d 'Print the output to stdout'
complete -c tspin -l disable-builtin-keywords -d 'Disable the highlighting of all builtin keyword groups (booleans, severity and REST)'
complete -c tspin -l disable-booleans -d 'Disable the highlighting of booleans and nulls'
Expand Down
18 changes: 9 additions & 9 deletions completions/tspin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ _tspin() {

local context curcontext="$curcontext" state line
_arguments "${_arguments_options[@]}" \
'-c+[Path to a custom configuration file]:CONFIG_PATH: ' \
'--config-path=[Path to a custom configuration file]:CONFIG_PATH: ' \
'(-f --follow)-l+[Continuously listens to the stdout of the provided command and prevents interrupt events (Ctrl + C) from reaching the command]:LISTEN_COMMAND: ' \
'(-f --follow)--follow-command=[Continuously listens to the stdout of the provided command and prevents interrupt events (Ctrl + C) from reaching the command]:LISTEN_COMMAND: ' \
'-c+[Provide a custom path to a configuration file]:CONFIG_PATH: ' \
'--config-path=[Provide a custom path to a configuration file]:CONFIG_PATH: ' \
'(-f --follow)-l+[Continuously listen to stdout from provided command and prevent interrupt events (Ctrl + C) from reaching the command]:LISTEN_COMMAND: ' \
'(-f --follow)--follow-command=[Continuously listen to stdout from provided command and prevent interrupt events (Ctrl + C) from reaching the command]:LISTEN_COMMAND: ' \
'*--words-red=[Highlight the provided words in red]:WORDS_RED: ' \
'*--words-green=[Highlight the provided words in green]:WORDS_GREEN: ' \
'*--words-yellow=[Highlight the provided words in yellow]:WORDS_YELLOW: ' \
'*--words-blue=[Highlight the provided words in blue]:WORDS_BLUE: ' \
'*--words-magenta=[Highlight the provided words in magenta]:WORDS_MAGENTA: ' \
'*--words-cyan=[Highlight the provided words in cyan]:WORDS_CYAN: ' \
'--z-generate-shell-completions=[Print completions to stdout]:GENERATE_SHELL_COMPLETIONS: ' \
'--bucket-size=[Set the bucket size for parallel processing]:BUCKET_SIZE: ' \
'-f[Follow (tail) the contents of the file]' \
'--follow[Follow (tail) the contents of the file]' \
'-t[Start at the end of the file]' \
'--tail[Start at the end of the file]' \
'--z-generate-shell-completions=[Print completions to stdout]:GENERATE_SHELL_COMPLETIONS: ' \
'-f[Follow the contents of a file]' \
'--follow[Follow the contents of a file]' \
'-e[Start at the end of the file]' \
'--start-at-end[Start at the end of the file]' \
'(-f --follow)-p[Print the output to stdout]' \
'(-f --follow)--print[Print the output to stdout]' \
'--disable-builtin-keywords[Disable the highlighting of all builtin keyword groups (booleans, severity and REST)]' \
Expand Down
6 changes: 3 additions & 3 deletions man/tspin.1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
.\" Title: tspin
.\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 2.0.20
.\" Date: 2024-01-05
.\" Date: 2024-01-08
.\" Manual: tailspin
.\" Source: tailspin 2.3.0
.\" Language: English
.\"
.TH "TSPIN" "1" "2024-01-05" "tailspin 2.3.0" "tailspin"
.TH "TSPIN" "1" "2024-01-08" "tailspin 2.3.0" "tailspin"
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.ss \n[.ss] 0
Expand Down Expand Up @@ -43,7 +43,7 @@ Follow (tail) the contents of the file.
Always true if opening a folder or using the \fI\-\-follow\-command\fP flag.
.RE
.sp
\fB\-t, \-\-tail\fP
\fB\-e, \-\-start\-at\-end\fP
.RS 4
Start at the end of the file.
Always true if opening a folder.
Expand Down

0 comments on commit 08b0480

Please sign in to comment.