diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index db1acf1..68a783d 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -22,7 +22,7 @@ jobs: - name: Set up Go uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2 with: - go-version: 1.18 + go-version: 1.19 - name: Setup Ruby uses: ruby/setup-ruby@ebaea52cb20fea395b0904125276395e37183dac diff --git a/LICENSE b/LICENSE index 50aa5d9..533a79d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2013-2021 Junegunn Choi +Copyright (c) 2013-2022 Junegunn Choi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/ansi.go b/src/ansi.go index 698bf89..543dabf 100644 --- a/src/ansi.go +++ b/src/ansi.go @@ -126,7 +126,6 @@ func isCtrlSeqStart(c uint8) bool { // calling FindStringIndex() on the below regex (which was originally used): // // "(?:\x1b[\\[()][0-9;?]*[a-zA-Z@]|\x1b][0-9];[[:print:]]+(?:\x1b\\\\|\x07)|\x1b.|[\x0e\x0f]|.\x08)" -// func nextAnsiEscapeSequence(s string) (int, int) { // fast check for ANSI escape sequences i := 0 diff --git a/src/ansi_test.go b/src/ansi_test.go index cdccc10..781c0a1 100644 --- a/src/ansi_test.go +++ b/src/ansi_test.go @@ -15,13 +15,13 @@ import ( // testing nextAnsiEscapeSequence(). // // References: -// - https://github.com/gnachman/iTerm2 -// - https://web.archive.org/web/20090204053813/http://ascii-table.com/ansi-escape-sequences.php -// (archived from http://ascii-table.com/ansi-escape-sequences.php) -// - https://web.archive.org/web/20090227051140/http://ascii-table.com/ansi-escape-sequences-vt-100.php -// (archived from http://ascii-table.com/ansi-escape-sequences-vt-100.php) -// - http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x405.html -// - https://invisible-island.net/xterm/ctlseqs/ctlseqs.html +// - https://github.com/gnachman/iTerm2 +// - https://web.archive.org/web/20090204053813/http://ascii-table.com/ansi-escape-sequences.php +// (archived from http://ascii-table.com/ansi-escape-sequences.php) +// - https://web.archive.org/web/20090227051140/http://ascii-table.com/ansi-escape-sequences-vt-100.php +// (archived from http://ascii-table.com/ansi-escape-sequences-vt-100.php) +// - http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x405.html +// - https://invisible-island.net/xterm/ctlseqs/ctlseqs.html var ansiRegexReference = regexp.MustCompile("(?:\x1b[\\[()][0-9;]*[a-zA-Z@]|\x1b][0-9];[[:print:]]+(?:\x1b\\\\|\x07)|\x1b.|[\x0e\x0f]|.\x08)") func testParserReference(t testing.TB, str string) { diff --git a/src/core.go b/src/core.go index b4bccfb..ee55f1e 100644 --- a/src/core.go +++ b/src/core.go @@ -1,28 +1,4 @@ -/* -Package fzf implements fzf, a command-line fuzzy finder. - -The MIT License (MIT) - -Copyright (c) 2013-2021 Junegunn Choi - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ +// Package fzf implements fzf, a command-line fuzzy finder. package fzf import ( diff --git a/src/terminal.go b/src/terminal.go index bce7137..981f13a 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -25,14 +25,14 @@ import ( // import "github.com/pkg/profile" /* - Placeholder regex is used to extract placeholders from fzf's template - strings. Acts as input validation for parsePlaceholder function. - Describes the syntax, but it is fairly lenient. +Placeholder regex is used to extract placeholders from fzf's template +strings. Acts as input validation for parsePlaceholder function. +Describes the syntax, but it is fairly lenient. - The following pseudo regex has been reverse engineered from the - implementation. It is overly strict, but better describes whats possible. - As such it is not useful for validation, but rather to generate test - cases for example. +The following pseudo regex has been reverse engineered from the +implementation. It is overly strict, but better describes whats possible. +As such it is not useful for validation, but rather to generate test +cases for example. \\?(?: # escaped type {\+?s?f?RANGE(?:,RANGE)*} # token type diff --git a/src/terminal_test.go b/src/terminal_test.go index ee19b67..ebb6bda 100644 --- a/src/terminal_test.go +++ b/src/terminal_test.go @@ -421,10 +421,10 @@ func TestPowershellCommands(t *testing.T) { } /* - Test typical valid placeholders and parsing of them. +Test typical valid placeholders and parsing of them. - Also since the parser assumes the input is matched with `placeholder` regex, - the regex is tested here as well. +Also since the parser assumes the input is matched with `placeholder` regex, +the regex is tested here as well. */ func TestParsePlaceholder(t *testing.T) { // give, want pairs