Skip to content

Commit

Permalink
released 6.4
Browse files Browse the repository at this point in the history
fix #414
fix #415
  • Loading branch information
genivia-inc committed Aug 7, 2024
1 parent d12bacd commit 78af03d
Show file tree
Hide file tree
Showing 20 changed files with 598 additions and 163 deletions.
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3391,6 +3391,8 @@ The following fields may be used in the `FORMAT` string:

field | output
----------------------- | ------------------------------------------------------
`%%` | the percentage sign
`%~` | a newline (LF or CRLF in Windows)
`%F` | if option `-H` is used: the file pathname and separator
`%[TEXT]F` | if option `-H` is used: `TEXT`, the file pathname and separator
`%f` | the file pathname
Expand All @@ -3409,6 +3411,7 @@ field | output
`%K` | if option `-k` is used: the column number and separator
`%[TEXT]K` | if option `-k` is used: `TEXT`, the column number and separator
`%k` | the column number of the match
`%A` | byte range (offset and end) of a match in hex
`%B` | if option `-b` is used: the byte offset and separator
`%[TEXT]B` | if option `-b` is used: `TEXT`, the byte offset and separator
`%b` | the byte offset of the match
Expand All @@ -3425,7 +3428,6 @@ field | output
`%S` | if not the first match: separator, see also `%[SEP]$`
`%[TEXT]S` | if not the first match: `TEXT` and separator, see also `%[SEP]$`
`%s` | the separator, see also `%[TEXT]S` and `%[SEP]$`
`%~` | a newline (LF or CRLF in Windows)
`%R` | if option `--break` or `--heading` is used: a newline
`%m` | the number of matches, sequential (or number of matching files with `--format-end`)
`%M` | the number of matching lines (or number of matching files with `--format-end`)
Expand All @@ -3450,6 +3452,8 @@ field | output
`%Z` | the edit distance cost of an approximate match with option `-Z`
`%u` | select unique lines only unless option -u is used
`%[hhhh]U` | U+hhhh Unicode code point
`%[CODE]=` | a color CODE, such as `ms`, see [colors](#color)
`%=` | turn color off
`%1` `%2` ... `%9` | the first regex group capture of the match, and so on up to group `%9`, requires option `-P`
`%[NUM]#` | the group capture `NUM`; requires option `-P`
`%[NUM]b` | the byte offset of the group capture `NUM`; requires option `-P`
Expand Down Expand Up @@ -3491,15 +3495,25 @@ field | output
`%[TEXT1\|TEXT2\|...]G` | list of TEXT indexed by group capture indices that matched; requires option `-P`
`%g` | the group capture index of the match or 1 (see note)
`%[TEXT1\|TEXT2\|...]g` | the first TEXT indexed by the first group capture index that matched; requires option `-P`
`%%` | the percentage sign

Note:

- Formatted output is written without a terminating newline, unless `%~` is
explicitly specified in the format string.
- Option `-o` changes the output of the `%O` and `%Q` fields to output the
match only.
- Options `-c`, `-l` and `-o` change the output of `%C`, `%J`, `%X` and `%Y`
accordingly
- The `[TEXT]` part of a field is optional and may be omitted. When present,
the argument must be placed in `[]` brackets, for example `%[,]F` to output a
comma, the pathname, and a separator, when option `-H` is used.
- Numeric fields such as `%n` are padded with spaces when `%{width}n` is
specified.
- Matching line fields such as `%O` are cut to width when `%{width}O` is
specified or when `%{-width}O` is specified to cut from the end of the line.
- Character context on a matching line before or after a match is output when
`%{-width}o` or `%{+width}o` is specified for match fields such as `%o`,
where `%{width}o` without a +/- sign cuts the match to the specified width.
- Fields `%[SEP]$` and `%u` are switches and do not write anything to the
output.
- The separator used by `%F`, `%H`, `%N`, `%K`, `%B`, `%S`, and `%G` may be
Expand Down Expand Up @@ -5427,7 +5441,7 @@ in markdown:



ugrep 6.3.0 July 31, 2024 UGREP(1)
ugrep 6.4.0 August 7, 2024 UGREP(1)

🔝 [Back to table of contents](#toc)

Expand Down
Binary file modified bin/win32/ug.exe
Binary file not shown.
Binary file modified bin/win32/ugrep-indexer.exe
Binary file not shown.
Binary file modified bin/win32/ugrep.exe
Binary file not shown.
Binary file modified bin/win64/ug.exe
Binary file not shown.
Binary file modified bin/win64/ugrep-indexer.exe
Binary file not shown.
Binary file modified bin/win64/ugrep.exe
Binary file not shown.
30 changes: 21 additions & 9 deletions completions/bash/compgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,27 @@ _comp_cmd_ugrep()
_comp_cmd_ugrep_usage()
{
local -a usage
local line i=1
usage[0]="Usage:"
# generate list of options, concat the first sentence to them
while read -r line; do
# truncate to screen width
usage[$i]=${line:0:$COLUMNS}
(( ++i ))
done < <(_comp_cmd_ugrep_help)
local -a usage=()
local line i=0
case $COMP_TYPE in
33|63|64)
# generate list of options, concat the first sentence to them
usage[0]="Usage:"
while read -r line; do
# truncate to screen width
(( ++i ))
usage[$i]=${line:0:$COLUMNS}
done < <(_comp_cmd_ugrep_help)
;;
37)
# generate list of options
while read -r line; do
# keep initial option only, remove the rest
usage[$i]=${line%%[[, ]*}
(( ++i ))
done < <(_comp_cmd_ugrep_help)
;;
esac
COMPREPLY=( "${usage[@]}" )
compopt -o nosort
}
Expand Down
30 changes: 21 additions & 9 deletions completions/bash/ug
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,27 @@ _comp_cmd_ugrep()

_comp_cmd_ugrep_usage()
{
local -a usage
local line i=1
usage[0]="Usage:"
# generate list of options, concat the first sentence to them
while read -r line; do
# truncate to screen width
usage[$i]=${line:0:$COLUMNS}
(( ++i ))
done < <(_comp_cmd_ugrep_help)
local -a usage=()
local line i=0
case $COMP_TYPE in
33|63|64)
# generate list of options, concat the first sentence to them
usage[0]="Usage:"
while read -r line; do
# truncate to screen width
(( ++i ))
usage[$i]=${line:0:$COLUMNS}
done < <(_comp_cmd_ugrep_help)
;;
37)
# generate list of options
while read -r line; do
# keep initial option only, remove the rest
usage[$i]=${line%%[[, ]*}
(( ++i ))
done < <(_comp_cmd_ugrep_help)
;;
esac
COMPREPLY=( "${usage[@]}" )
compopt -o nosort
}
Expand Down
32 changes: 22 additions & 10 deletions completions/bash/ugrep-indexer
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,27 @@ _comp_cmd_ugrep_indexer()

_comp_cmd_ugrep_indexer_usage()
{
local -a usage
local line i=1
usage[0]="Usage:"
# generate list of options, concat the first sentence to them
while read -r line; do
# truncate to screen width
usage[$i]=${line:0:$COLUMNS}
(( ++i ))
done < <(_comp_cmd_ugrep_indexer_help)
local -a usage=()
local line i=0
case $COMP_TYPE in
33|63|64)
# generate list of options, concat the first sentence to them
usage[0]="Usage:"
while read -r line; do
# truncate to screen width
(( ++i ))
usage[$i]=${line:0:$COLUMNS}
done < <(_comp_cmd_ugrep_indexer_help)
;;
37)
# generate list of options
while read -r line; do
# keep initial option only, remove the rest
usage[$i]=${line%%[[, ]*}
(( ++i ))
done < <(_comp_cmd_ugrep_indexer_help)
;;
esac
COMPREPLY=( "${usage[@]}" )
compopt -o nosort
}
Expand All @@ -83,7 +95,7 @@ cat <<'END'
-I, --ignore-binary Do not index binary files.
-q, --quiet, --silent Quiet mode: do not display indexing statistics.
-S, --dereference-files Follow symbolic links to files.
-s, --no-messages Silent mode: nonexistent and unreadable files are ignored, i.e. their error messages and warnings are suppressed.
-s, --no-messages Silent mode: nonexistent and unreadable files are ignored, i.e. their error messages and warnings are suppressed.
-V, --version Display version and exit.
-v, --verbose Produce verbose output.
-X, --ignore-files, --ignore-files=FILE Do not index files and directories matching the globs in FILE encountered during indexing.
Expand Down
20 changes: 10 additions & 10 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.72 for ugrep 6.3.0.
# Generated by GNU Autoconf 2.72 for ugrep 6.4.0.
#
# Report bugs to <https://github.com/Genivia/ugrep/issues>.
#
Expand Down Expand Up @@ -606,8 +606,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ugrep'
PACKAGE_TARNAME='ugrep'
PACKAGE_VERSION='6.3.0'
PACKAGE_STRING='ugrep 6.3.0'
PACKAGE_VERSION='6.4.0'
PACKAGE_STRING='ugrep 6.4.0'
PACKAGE_BUGREPORT='https://github.com/Genivia/ugrep/issues'
PACKAGE_URL='https://ugrep.com'

Expand Down Expand Up @@ -1382,7 +1382,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
'configure' configures ugrep 6.3.0 to adapt to many kinds of systems.
'configure' configures ugrep 6.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1453,7 +1453,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of ugrep 6.3.0:";;
short | recursive ) echo "Configuration of ugrep 6.4.0:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1630,7 +1630,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
ugrep configure 6.3.0
ugrep configure 6.4.0
generated by GNU Autoconf 2.72
Copyright (C) 2023 Free Software Foundation, Inc.
Expand Down Expand Up @@ -2184,7 +2184,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by ugrep $as_me 6.3.0, which was
It was created by ugrep $as_me 6.4.0, which was
generated by GNU Autoconf 2.72. Invocation command line was
$ $0$ac_configure_args_raw
Expand Down Expand Up @@ -3694,7 +3694,7 @@ fi

# Define the identity of the package.
PACKAGE='ugrep'
VERSION='6.3.0'
VERSION='6.4.0'


printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
Expand Down Expand Up @@ -11790,7 +11790,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by ugrep $as_me 6.3.0, which was
This file was extended by ugrep $as_me 6.4.0, which was
generated by GNU Autoconf 2.72. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -11863,7 +11863,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
ugrep config.status 6.3.0
ugrep config.status 6.4.0
configured by $0, generated by GNU Autoconf 2.72,
with options \\"\$ac_cs_config\\"
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([ugrep],[6.3.0],[https://github.com/Genivia/ugrep/issues],[ugrep],[https://ugrep.com])
AC_INIT([ugrep],[6.4.0],[https://github.com/Genivia/ugrep/issues],[ugrep],[https://ugrep.com])
AM_INIT_AUTOMAKE([foreign subdir-objects dist-xz no-dist-gzip])
AC_CONFIG_HEADERS([config.h])
AC_COPYRIGHT([Copyright (C) 2019-2024 Robert van Engelen, Genivia Inc.])
Expand Down
2 changes: 1 addition & 1 deletion man/ug.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH UGREP "1" "July 31, 2024" "ugrep 6.3.0" "User Commands"
.TH UGREP "1" "August 07, 2024" "ugrep 6.4.0" "User Commands"
.SH NAME
\fBugrep\fR, \fBug\fR -- file pattern searcher
.SH SYNOPSIS
Expand Down
2 changes: 1 addition & 1 deletion man/ugrep-indexer.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH UGREP-INDEXER "1" "July 31, 2024" "ugrep-indexer 6.3.0" "User Commands"
.TH UGREP-INDEXER "1" "August 07, 2024" "ugrep-indexer 6.4.0" "User Commands"
.SH NAME
\fBugrep-indexer\fR -- file indexer to accelerate recursive searching
.SH SYNOPSIS
Expand Down
2 changes: 1 addition & 1 deletion man/ugrep.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH UGREP "1" "July 31, 2024" "ugrep 6.3.0" "User Commands"
.TH UGREP "1" "August 07, 2024" "ugrep 6.4.0" "User Commands"
.SH NAME
\fBugrep\fR, \fBug\fR -- file pattern searcher
.SH SYNOPSIS
Expand Down
Loading

0 comments on commit 78af03d

Please sign in to comment.