Projects STRLCPY fzf Commits f4fd5321
🤬
  • ■ ■ ■ ■
    .github/workflows/linux.yml
    skipped 21 lines
    22 22   - name: Set up Go
    23 23   uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v2
    24 24   with:
    25  - go-version: 1.18
     25 + go-version: 1.19
    26 26   
    27 27   - name: Setup Ruby
    28 28   uses: ruby/setup-ruby@ebaea52cb20fea395b0904125276395e37183dac
    skipped 18 lines
  • ■ ■ ■ ■
    LICENSE
    1 1  The MIT License (MIT)
    2 2   
    3  -Copyright (c) 2013-2021 Junegunn Choi
     3 +Copyright (c) 2013-2022 Junegunn Choi
    4 4   
    5 5  Permission is hereby granted, free of charge, to any person obtaining a copy
    6 6  of this software and associated documentation files (the "Software"), to deal
    skipped 16 lines
  • ■ ■ ■ ■ ■
    src/ansi.go
    skipped 125 lines
    126 126  // calling FindStringIndex() on the below regex (which was originally used):
    127 127  //
    128 128  // "(?:\x1b[\\[()][0-9;?]*[a-zA-Z@]|\x1b][0-9];[[:print:]]+(?:\x1b\\\\|\x07)|\x1b.|[\x0e\x0f]|.\x08)"
    129  -//
    130 129  func nextAnsiEscapeSequence(s string) (int, int) {
    131 130   // fast check for ANSI escape sequences
    132 131   i := 0
    skipped 278 lines
  • ■ ■ ■ ■ ■ ■
    src/ansi_test.go
    skipped 14 lines
    15 15  // testing nextAnsiEscapeSequence().
    16 16  //
    17 17  // References:
    18  -// - https://github.com/gnachman/iTerm2
    19  -// - https://web.archive.org/web/20090204053813/http://ascii-table.com/ansi-escape-sequences.php
    20  -// (archived from http://ascii-table.com/ansi-escape-sequences.php)
    21  -// - https://web.archive.org/web/20090227051140/http://ascii-table.com/ansi-escape-sequences-vt-100.php
    22  -// (archived from http://ascii-table.com/ansi-escape-sequences-vt-100.php)
    23  -// - http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x405.html
    24  -// - https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
     18 +// - https://github.com/gnachman/iTerm2
     19 +// - https://web.archive.org/web/20090204053813/http://ascii-table.com/ansi-escape-sequences.php
     20 +// (archived from http://ascii-table.com/ansi-escape-sequences.php)
     21 +// - https://web.archive.org/web/20090227051140/http://ascii-table.com/ansi-escape-sequences-vt-100.php
     22 +// (archived from http://ascii-table.com/ansi-escape-sequences-vt-100.php)
     23 +// - http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x405.html
     24 +// - https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
    25 25  var ansiRegexReference = regexp.MustCompile("(?:\x1b[\\[()][0-9;]*[a-zA-Z@]|\x1b][0-9];[[:print:]]+(?:\x1b\\\\|\x07)|\x1b.|[\x0e\x0f]|.\x08)")
    26 26   
    27 27  func testParserReference(t testing.TB, str string) {
    skipped 401 lines
  • ■ ■ ■ ■ ■
    src/core.go
    1  -/*
    2  -Package fzf implements fzf, a command-line fuzzy finder.
    3  - 
    4  -The MIT License (MIT)
    5  - 
    6  -Copyright (c) 2013-2021 Junegunn Choi
    7  - 
    8  -Permission is hereby granted, free of charge, to any person obtaining a copy
    9  -of this software and associated documentation files (the "Software"), to deal
    10  -in the Software without restriction, including without limitation the rights
    11  -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    12  -copies of the Software, and to permit persons to whom the Software is
    13  -furnished to do so, subject to the following conditions:
    14  - 
    15  -The above copyright notice and this permission notice shall be included in
    16  -all copies or substantial portions of the Software.
    17  - 
    18  -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    19  -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    20  -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    21  -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    22  -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    23  -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    24  -THE SOFTWARE.
    25  -*/
     1 +// Package fzf implements fzf, a command-line fuzzy finder.
    26 2  package fzf
    27 3   
    28 4  import (
    skipped 330 lines
  • ■ ■ ■ ■ ■ ■
    src/terminal.go
    skipped 24 lines
    25 25  // import "github.com/pkg/profile"
    26 26   
    27 27  /*
    28  - Placeholder regex is used to extract placeholders from fzf's template
    29  - strings. Acts as input validation for parsePlaceholder function.
    30  - Describes the syntax, but it is fairly lenient.
     28 +Placeholder regex is used to extract placeholders from fzf's template
     29 +strings. Acts as input validation for parsePlaceholder function.
     30 +Describes the syntax, but it is fairly lenient.
    31 31   
    32  - The following pseudo regex has been reverse engineered from the
    33  - implementation. It is overly strict, but better describes whats possible.
    34  - As such it is not useful for validation, but rather to generate test
    35  - cases for example.
     32 +The following pseudo regex has been reverse engineered from the
     33 +implementation. It is overly strict, but better describes whats possible.
     34 +As such it is not useful for validation, but rather to generate test
     35 +cases for example.
    36 36   
    37 37   \\?(?: # escaped type
    38 38   {\+?s?f?RANGE(?:,RANGE)*} # token type
    skipped 2900 lines
  • ■ ■ ■ ■ ■ ■
    src/terminal_test.go
    skipped 420 lines
    421 421  }
    422 422   
    423 423  /*
    424  - Test typical valid placeholders and parsing of them.
     424 +Test typical valid placeholders and parsing of them.
    425 425   
    426  - Also since the parser assumes the input is matched with `placeholder` regex,
    427  - the regex is tested here as well.
     426 +Also since the parser assumes the input is matched with `placeholder` regex,
     427 +the regex is tested here as well.
    428 428  */
    429 429  func TestParsePlaceholder(t *testing.T) {
    430 430   // give, want pairs
    skipped 209 lines
Please wait...
Page is in error, reload to recover