Revert "Add GitHub action for labelling PRs"
Before adoption: this commit came in with the history the project adopted, so no landing records it.
This reverts commit 0ff13dcf.
authored by Junegunn Choi · committed by Junegunn Choi · parent 0ff13dc · Browse files · 10 files·+179 added−504 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
10 files+179 added−504 removed
- tests:+0 added−106 removed
- other:+179 added−398 removed
Provenance
- Commit
dce248a- Tree
3bef681- Author
Junegunn Choi <junegunn.c@gmail.com>- Committer
Junegunn Choi <junegunn.c@gmail.com>- Parent
0ff13dc
10 files changed+179 added−504 removed
deleted:.github/workflows/labeler.yml-17 removed
1234567891011121314151617name: Label PRs
on: pull_request_target: types: [opened, synchronize, reopened]
permissions: contents: read pull-requests: write
jobs: label: runs-on: ubuntu-latest steps: - uses: actions/labeler@v5 with: configuration-path: .github/labeler.ymldeleted:.github/labeler.yml-64 removed
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364go: - changed-files: - any-glob-to-any-file: - src/** - main.go - go.mod - go.sum
shell: - changed-files: - any-glob-to-any-file: - shell/**
bash: - changed-files: - any-glob-to-any-file: - shell/**/*.bash
zsh: - changed-files: - any-glob-to-any-file: - shell/**/*.zsh
fish: - changed-files: - any-glob-to-any-file: - shell/**/*.fish
vim: - changed-files: - any-glob-to-any-file: - plugin/**
docs: - changed-files: - any-glob-to-any-file: - '*.md' - doc/** - man/**
ci: - changed-files: - any-glob-to-any-file: - .github/**
build: - changed-files: - any-glob-to-any-file: - Makefile - .goreleaser.yml - Dockerfile
test: - changed-files: - any-glob-to-any-file: - test/** - src/**/*_test.go
install: - changed-files: - any-glob-to-any-file: - install - install.ps1 - uninstallmodified:man/man1/fzf.1-12 removed
132 unmodified lines133 134 # Use template to rearrange fields135 echo foo,bar,baz | fzf --delimiter , --with-nth '{n},{1},{3},{2},{1..2}'136 .RE137-.RS138-139-\fBchange\-with\-nth\fR action is only available when \fB\-\-with\-nth\fR is set.140-When \fB\-\-with\-nth\fR is used, fzf retains the original input lines in memory141-so they can be re\-transformed on the fly (e.g. \fB\-\-with\-nth ..\fR to keep142-the original presentation). This increases memory usage, so only use143-\fB\-\-with\-nth\fR when you actually need field transformation.144-.RE137 .TP138 .BI "\-\-accept\-nth=" "N[,..] or TEMPLATE"139 Define which fields to print on accept. The last delimiter is stripped from the140 output. For advanced transformation, you can provide a template containing1256 unmodified lines1397 .BR FZF_INPUT_STATE " Current input state (enabled, disabled, hidden)"1398 .br1399 .BR FZF_NTH " Current \-\-nth option"1400 .br1409-.BR FZF_WITH_NTH " Current \-\-with\-nth option"1410-.br1401 .BR FZF_PROMPT " Prompt string"1402 .br1403 .BR FZF_GHOST " Ghost string"1404 .br482 unmodified lines1887 \fBchange\-list\-label(...)\fR (change \fB\-\-list\-label\fR to the given string)1888 \fBchange\-multi\fR (enable multi-select mode with no limit)1889 \fBchange\-multi(...)\fR (enable multi-select mode with a limit or disable it with 0)1890 \fBchange\-nth(...)\fR (change \fB\-\-nth\fR option; rotate through the multiple options separated by '|')1901- \fBchange\-with\-nth(...)\fR (change \fB\-\-with\-nth\fR option; rotate through the multiple options separated by '|')1891 \fBchange\-pointer(...)\fR (change \fB\-\-pointer\fR option)1892 \fBchange\-preview(...)\fR (change \fB\-\-preview\fR option)1893 \fBchange\-preview\-label(...)\fR (change \fB\-\-preview\-label\fR to the given string)1894 \fBchange\-preview\-window(...)\fR (change \fB\-\-preview\-window\fR option; rotate through the multiple option sets separated by '|')97 unmodified lines1992 \fBtransform\-header\-label(...)\fR (transform header label using an external command)1993 \fBtransform\-input\-label(...)\fR (transform input label using an external command)1994 \fBtransform\-list\-label(...)\fR (transform list label using an external command)1995 \fBtransform\-nth(...)\fR (transform nth using an external command)2007- \fBtransform\-with\-nth(...)\fR (transform with-nth using an external command)1996 \fBtransform\-pointer(...)\fR (transform pointer using an external command)1997 \fBtransform\-preview\-label(...)\fR (transform preview label using an external command)1998 \fBtransform\-prompt(...)\fR (transform prompt string using an external command)1999 \fBtransform\-query(...)\fR (transform query string using an external command)209 unmodified linesmodified:src/actiontype_string.go+147 added-150 removed
36 unmodified lines37 _ = x[actChangeInputLabel-26]38 _ = x[actChangeListLabel-27]39 _ = x[actChangeMulti-28]40 _ = x[actChangeNth-29]41- _ = x[actChangeWithNth-30]42- _ = x[actChangePointer-31]43- _ = x[actChangePreview-32]44- _ = x[actChangePreviewLabel-33]45- _ = x[actChangePreviewWindow-34]46- _ = x[actChangePrompt-35]47- _ = x[actChangeQuery-36]48- _ = x[actClearScreen-37]49- _ = x[actClearQuery-38]50- _ = x[actClearSelection-39]51- _ = x[actClose-40]52- _ = x[actDeleteChar-41]53- _ = x[actDeleteCharEof-42]54- _ = x[actEndOfLine-43]55- _ = x[actFatal-44]56- _ = x[actForwardChar-45]57- _ = x[actForwardWord-46]58- _ = x[actForwardSubWord-47]59- _ = x[actKillLine-48]60- _ = x[actKillWord-49]61- _ = x[actKillSubWord-50]62- _ = x[actUnixLineDiscard-51]63- _ = x[actUnixWordRubout-52]64- _ = x[actYank-53]65- _ = x[actBackwardKillWord-54]66- _ = x[actBackwardKillSubWord-55]67- _ = x[actSelectAll-56]68- _ = x[actDeselectAll-57]69- _ = x[actToggle-58]70- _ = x[actToggleSearch-59]71- _ = x[actToggleAll-60]72- _ = x[actToggleDown-61]73- _ = x[actToggleUp-62]74- _ = x[actToggleIn-63]75- _ = x[actToggleOut-64]76- _ = x[actToggleTrack-65]77- _ = x[actToggleTrackCurrent-66]78- _ = x[actToggleHeader-67]79- _ = x[actToggleWrap-68]80- _ = x[actToggleWrapWord-69]81- _ = x[actToggleMultiLine-70]82- _ = x[actToggleHscroll-71]83- _ = x[actToggleRaw-72]84- _ = x[actEnableRaw-73]85- _ = x[actDisableRaw-74]86- _ = x[actTrackCurrent-75]87- _ = x[actToggleInput-76]88- _ = x[actHideInput-77]89- _ = x[actShowInput-78]90- _ = x[actUntrackCurrent-79]91- _ = x[actDown-80]92- _ = x[actDownMatch-81]93- _ = x[actUp-82]94- _ = x[actUpMatch-83]95- _ = x[actPageUp-84]96- _ = x[actPageDown-85]97- _ = x[actPosition-86]98- _ = x[actHalfPageUp-87]99- _ = x[actHalfPageDown-88]100- _ = x[actOffsetUp-89]101- _ = x[actOffsetDown-90]102- _ = x[actOffsetMiddle-91]103- _ = x[actJump-92]104- _ = x[actJumpAccept-93]105- _ = x[actPrintQuery-94]106- _ = x[actRefreshPreview-95]107- _ = x[actReplaceQuery-96]108- _ = x[actToggleSort-97]109- _ = x[actShowPreview-98]110- _ = x[actHidePreview-99]111- _ = x[actTogglePreview-100]112- _ = x[actTogglePreviewWrap-101]113- _ = x[actTogglePreviewWrapWord-102]114- _ = x[actTransform-103]115- _ = x[actTransformBorderLabel-104]116- _ = x[actTransformGhost-105]117- _ = x[actTransformHeader-106]118- _ = x[actTransformHeaderLines-107]119- _ = x[actTransformFooter-108]120- _ = x[actTransformHeaderLabel-109]121- _ = x[actTransformFooterLabel-110]122- _ = x[actTransformInputLabel-111]123- _ = x[actTransformListLabel-112]124- _ = x[actTransformNth-113]125- _ = x[actTransformWithNth-114]126- _ = x[actTransformPointer-115]127- _ = x[actTransformPreviewLabel-116]128- _ = x[actTransformPrompt-117]129- _ = x[actTransformQuery-118]130- _ = x[actTransformSearch-119]131- _ = x[actTrigger-120]132- _ = x[actBgTransform-121]133- _ = x[actBgTransformBorderLabel-122]134- _ = x[actBgTransformGhost-123]135- _ = x[actBgTransformHeader-124]136- _ = x[actBgTransformHeaderLines-125]137- _ = x[actBgTransformFooter-126]138- _ = x[actBgTransformHeaderLabel-127]139- _ = x[actBgTransformFooterLabel-128]140- _ = x[actBgTransformInputLabel-129]141- _ = x[actBgTransformListLabel-130]142- _ = x[actBgTransformNth-131]143- _ = x[actBgTransformWithNth-132]144- _ = x[actBgTransformPointer-133]145- _ = x[actBgTransformPreviewLabel-134]146- _ = x[actBgTransformPrompt-135]147- _ = x[actBgTransformQuery-136]148- _ = x[actBgTransformSearch-137]149- _ = x[actBgCancel-138]150- _ = x[actSearch-139]151- _ = x[actPreview-140]152- _ = x[actPreviewTop-141]153- _ = x[actPreviewBottom-142]154- _ = x[actPreviewUp-143]155- _ = x[actPreviewDown-144]156- _ = x[actPreviewPageUp-145]157- _ = x[actPreviewPageDown-146]158- _ = x[actPreviewHalfPageUp-147]159- _ = x[actPreviewHalfPageDown-148]160- _ = x[actPrevHistory-149]161- _ = x[actPrevSelected-150]162- _ = x[actPrint-151]163- _ = x[actPut-152]164- _ = x[actNextHistory-153]165- _ = x[actNextSelected-154]166- _ = x[actExecute-155]167- _ = x[actExecuteSilent-156]168- _ = x[actExecuteMulti-157]169- _ = x[actSigStop-158]170- _ = x[actBest-159]171- _ = x[actFirst-160]172- _ = x[actLast-161]173- _ = x[actReload-162]174- _ = x[actReloadSync-163]175- _ = x[actDisableSearch-164]176- _ = x[actEnableSearch-165]177- _ = x[actSelect-166]178- _ = x[actDeselect-167]179- _ = x[actUnbind-168]180- _ = x[actRebind-169]181- _ = x[actToggleBind-170]182- _ = x[actBecome-171]183- _ = x[actShowHeader-172]184- _ = x[actHideHeader-173]185- _ = x[actBell-174]186- _ = x[actExclude-175]187- _ = x[actExcludeMulti-176]188- _ = x[actAsync-177]41+ _ = x[actChangePointer-30]42+ _ = x[actChangePreview-31]43+ _ = x[actChangePreviewLabel-32]44+ _ = x[actChangePreviewWindow-33]45+ _ = x[actChangePrompt-34]46+ _ = x[actChangeQuery-35]47+ _ = x[actClearScreen-36]48+ _ = x[actClearQuery-37]49+ _ = x[actClearSelection-38]50+ _ = x[actClose-39]51+ _ = x[actDeleteChar-40]52+ _ = x[actDeleteCharEof-41]53+ _ = x[actEndOfLine-42]54+ _ = x[actFatal-43]55+ _ = x[actForwardChar-44]56+ _ = x[actForwardWord-45]57+ _ = x[actForwardSubWord-46]58+ _ = x[actKillLine-47]59+ _ = x[actKillWord-48]60+ _ = x[actKillSubWord-49]61+ _ = x[actUnixLineDiscard-50]62+ _ = x[actUnixWordRubout-51]63+ _ = x[actYank-52]64+ _ = x[actBackwardKillWord-53]65+ _ = x[actBackwardKillSubWord-54]66+ _ = x[actSelectAll-55]67+ _ = x[actDeselectAll-56]68+ _ = x[actToggle-57]69+ _ = x[actToggleSearch-58]70+ _ = x[actToggleAll-59]71+ _ = x[actToggleDown-60]72+ _ = x[actToggleUp-61]73+ _ = x[actToggleIn-62]74+ _ = x[actToggleOut-63]75+ _ = x[actToggleTrack-64]76+ _ = x[actToggleTrackCurrent-65]77+ _ = x[actToggleHeader-66]78+ _ = x[actToggleWrap-67]79+ _ = x[actToggleWrapWord-68]80+ _ = x[actToggleMultiLine-69]81+ _ = x[actToggleHscroll-70]82+ _ = x[actToggleRaw-71]83+ _ = x[actEnableRaw-72]84+ _ = x[actDisableRaw-73]85+ _ = x[actTrackCurrent-74]86+ _ = x[actToggleInput-75]87+ _ = x[actHideInput-76]88+ _ = x[actShowInput-77]89+ _ = x[actUntrackCurrent-78]90+ _ = x[actDown-79]91+ _ = x[actDownMatch-80]92+ _ = x[actUp-81]93+ _ = x[actUpMatch-82]94+ _ = x[actPageUp-83]95+ _ = x[actPageDown-84]96+ _ = x[actPosition-85]97+ _ = x[actHalfPageUp-86]98+ _ = x[actHalfPageDown-87]99+ _ = x[actOffsetUp-88]100+ _ = x[actOffsetDown-89]101+ _ = x[actOffsetMiddle-90]102+ _ = x[actJump-91]103+ _ = x[actJumpAccept-92]104+ _ = x[actPrintQuery-93]105+ _ = x[actRefreshPreview-94]106+ _ = x[actReplaceQuery-95]107+ _ = x[actToggleSort-96]108+ _ = x[actShowPreview-97]109+ _ = x[actHidePreview-98]110+ _ = x[actTogglePreview-99]111+ _ = x[actTogglePreviewWrap-100]112+ _ = x[actTogglePreviewWrapWord-101]113+ _ = x[actTransform-102]114+ _ = x[actTransformBorderLabel-103]115+ _ = x[actTransformGhost-104]116+ _ = x[actTransformHeader-105]117+ _ = x[actTransformHeaderLines-106]118+ _ = x[actTransformFooter-107]119+ _ = x[actTransformHeaderLabel-108]120+ _ = x[actTransformFooterLabel-109]121+ _ = x[actTransformInputLabel-110]122+ _ = x[actTransformListLabel-111]123+ _ = x[actTransformNth-112]124+ _ = x[actTransformPointer-113]125+ _ = x[actTransformPreviewLabel-114]126+ _ = x[actTransformPrompt-115]127+ _ = x[actTransformQuery-116]128+ _ = x[actTransformSearch-117]129+ _ = x[actTrigger-118]130+ _ = x[actBgTransform-119]131+ _ = x[actBgTransformBorderLabel-120]132+ _ = x[actBgTransformGhost-121]133+ _ = x[actBgTransformHeader-122]134+ _ = x[actBgTransformHeaderLines-123]135+ _ = x[actBgTransformFooter-124]136+ _ = x[actBgTransformHeaderLabel-125]137+ _ = x[actBgTransformFooterLabel-126]138+ _ = x[actBgTransformInputLabel-127]139+ _ = x[actBgTransformListLabel-128]140+ _ = x[actBgTransformNth-129]141+ _ = x[actBgTransformPointer-130]142+ _ = x[actBgTransformPreviewLabel-131]143+ _ = x[actBgTransformPrompt-132]144+ _ = x[actBgTransformQuery-133]145+ _ = x[actBgTransformSearch-134]146+ _ = x[actBgCancel-135]147+ _ = x[actSearch-136]148+ _ = x[actPreview-137]149+ _ = x[actPreviewTop-138]150+ _ = x[actPreviewBottom-139]151+ _ = x[actPreviewUp-140]152+ _ = x[actPreviewDown-141]153+ _ = x[actPreviewPageUp-142]154+ _ = x[actPreviewPageDown-143]155+ _ = x[actPreviewHalfPageUp-144]156+ _ = x[actPreviewHalfPageDown-145]157+ _ = x[actPrevHistory-146]158+ _ = x[actPrevSelected-147]159+ _ = x[actPrint-148]160+ _ = x[actPut-149]161+ _ = x[actNextHistory-150]162+ _ = x[actNextSelected-151]163+ _ = x[actExecute-152]164+ _ = x[actExecuteSilent-153]165+ _ = x[actExecuteMulti-154]166+ _ = x[actSigStop-155]167+ _ = x[actBest-156]168+ _ = x[actFirst-157]169+ _ = x[actLast-158]170+ _ = x[actReload-159]171+ _ = x[actReloadSync-160]172+ _ = x[actDisableSearch-161]173+ _ = x[actEnableSearch-162]174+ _ = x[actSelect-163]175+ _ = x[actDeselect-164]176+ _ = x[actUnbind-165]177+ _ = x[actRebind-166]178+ _ = x[actToggleBind-167]179+ _ = x[actBecome-168]180+ _ = x[actShowHeader-169]181+ _ = x[actHideHeader-170]182+ _ = x[actBell-171]183+ _ = x[actExclude-172]184+ _ = x[actExcludeMulti-173]185+ _ = x[actAsync-174]186 }187 191-const _actionType_name = "actIgnoreactStartactClickactInvalidactBracketedPasteBeginactBracketedPasteEndactCharactMouseactBeginningOfLineactAbortactAcceptactAcceptNonEmptyactAcceptOrPrintQueryactBackwardCharactBackwardDeleteCharactBackwardDeleteCharEofactBackwardWordactBackwardSubWordactCancelactChangeBorderLabelactChangeGhostactChangeHeaderactChangeHeaderLinesactChangeFooteractChangeHeaderLabelactChangeFooterLabelactChangeInputLabelactChangeListLabelactChangeMultiactChangeNthactChangeWithNthactChangePointeractChangePreviewactChangePreviewLabelactChangePreviewWindowactChangePromptactChangeQueryactClearScreenactClearQueryactClearSelectionactCloseactDeleteCharactDeleteCharEofactEndOfLineactFatalactForwardCharactForwardWordactForwardSubWordactKillLineactKillWordactKillSubWordactUnixLineDiscardactUnixWordRuboutactYankactBackwardKillWordactBackwardKillSubWordactSelectAllactDeselectAllactToggleactToggleSearchactToggleAllactToggleDownactToggleUpactToggleInactToggleOutactToggleTrackactToggleTrackCurrentactToggleHeaderactToggleWrapactToggleWrapWordactToggleMultiLineactToggleHscrollactToggleRawactEnableRawactDisableRawactTrackCurrentactToggleInputactHideInputactShowInputactUntrackCurrentactDownactDownMatchactUpactUpMatchactPageUpactPageDownactPositionactHalfPageUpactHalfPageDownactOffsetUpactOffsetDownactOffsetMiddleactJumpactJumpAcceptactPrintQueryactRefreshPreviewactReplaceQueryactToggleSortactShowPreviewactHidePreviewactTogglePreviewactTogglePreviewWrapactTogglePreviewWrapWordactTransformactTransformBorderLabelactTransformGhostactTransformHeaderactTransformHeaderLinesactTransformFooteractTransformHeaderLabelactTransformFooterLabelactTransformInputLabelactTransformListLabelactTransformNthactTransformWithNthactTransformPointeractTransformPreviewLabelactTransformPromptactTransformQueryactTransformSearchactTriggeractBgTransformactBgTransformBorderLabelactBgTransformGhostactBgTransformHeaderactBgTransformHeaderLinesactBgTransformFooteractBgTransformHeaderLabelactBgTransformFooterLabelactBgTransformInputLabelactBgTransformListLabelactBgTransformNthactBgTransformWithNthactBgTransformPointeractBgTransformPreviewLabelactBgTransformPromptactBgTransformQueryactBgTransformSearchactBgCancelactSearchactPreviewactPreviewTopactPreviewBottomactPreviewUpactPreviewDownactPreviewPageUpactPreviewPageDownactPreviewHalfPageUpactPreviewHalfPageDownactPrevHistoryactPrevSelectedactPrintactPutactNextHistoryactNextSelectedactExecuteactExecuteSilentactExecuteMultiactSigStopactBestactFirstactLastactReloadactReloadSyncactDisableSearchactEnableSearchactSelectactDeselectactUnbindactRebindactToggleBindactBecomeactShowHeaderactHideHeaderactBellactExcludeactExcludeMultiactAsync"188+const _actionType_name = "actIgnoreactStartactClickactInvalidactBracketedPasteBeginactBracketedPasteEndactCharactMouseactBeginningOfLineactAbortactAcceptactAcceptNonEmptyactAcceptOrPrintQueryactBackwardCharactBackwardDeleteCharactBackwardDeleteCharEofactBackwardWordactBackwardSubWordactCancelactChangeBorderLabelactChangeGhostactChangeHeaderactChangeHeaderLinesactChangeFooteractChangeHeaderLabelactChangeFooterLabelactChangeInputLabelactChangeListLabelactChangeMultiactChangeNthactChangePointeractChangePreviewactChangePreviewLabelactChangePreviewWindowactChangePromptactChangeQueryactClearScreenactClearQueryactClearSelectionactCloseactDeleteCharactDeleteCharEofactEndOfLineactFatalactForwardCharactForwardWordactForwardSubWordactKillLineactKillWordactKillSubWordactUnixLineDiscardactUnixWordRuboutactYankactBackwardKillWordactBackwardKillSubWordactSelectAllactDeselectAllactToggleactToggleSearchactToggleAllactToggleDownactToggleUpactToggleInactToggleOutactToggleTrackactToggleTrackCurrentactToggleHeaderactToggleWrapactToggleWrapWordactToggleMultiLineactToggleHscrollactToggleRawactEnableRawactDisableRawactTrackCurrentactToggleInputactHideInputactShowInputactUntrackCurrentactDownactDownMatchactUpactUpMatchactPageUpactPageDownactPositionactHalfPageUpactHalfPageDownactOffsetUpactOffsetDownactOffsetMiddleactJumpactJumpAcceptactPrintQueryactRefreshPreviewactReplaceQueryactToggleSortactShowPreviewactHidePreviewactTogglePreviewactTogglePreviewWrapactTogglePreviewWrapWordactTransformactTransformBorderLabelactTransformGhostactTransformHeaderactTransformHeaderLinesactTransformFooteractTransformHeaderLabelactTransformFooterLabelactTransformInputLabelactTransformListLabelactTransformNthactTransformPointeractTransformPreviewLabelactTransformPromptactTransformQueryactTransformSearchactTriggeractBgTransformactBgTransformBorderLabelactBgTransformGhostactBgTransformHeaderactBgTransformHeaderLinesactBgTransformFooteractBgTransformHeaderLabelactBgTransformFooterLabelactBgTransformInputLabelactBgTransformListLabelactBgTransformNthactBgTransformPointeractBgTransformPreviewLabelactBgTransformPromptactBgTransformQueryactBgTransformSearchactBgCancelactSearchactPreviewactPreviewTopactPreviewBottomactPreviewUpactPreviewDownactPreviewPageUpactPreviewPageDownactPreviewHalfPageUpactPreviewHalfPageDownactPrevHistoryactPrevSelectedactPrintactPutactNextHistoryactNextSelectedactExecuteactExecuteSilentactExecuteMultiactSigStopactBestactFirstactLastactReloadactReloadSyncactDisableSearchactEnableSearchactSelectactDeselectactUnbindactRebindactToggleBindactBecomeactShowHeaderactHideHeaderactBellactExcludeactExcludeMultiactAsync"189 193-var _actionType_index = [...]uint16{0, 9, 17, 25, 35, 57, 77, 84, 92, 110, 118, 127, 144, 165, 180, 201, 225, 240, 258, 267, 287, 301, 316, 336, 351, 371, 391, 410, 428, 442, 454, 470, 486, 502, 523, 545, 560, 574, 588, 601, 618, 626, 639, 655, 667, 675, 689, 703, 720, 731, 742, 756, 774, 791, 798, 817, 839, 851, 865, 874, 889, 901, 914, 925, 936, 948, 962, 983, 998, 1011, 1028, 1046, 1062, 1074, 1086, 1099, 1114, 1128, 1140, 1152, 1169, 1176, 1188, 1193, 1203, 1212, 1223, 1234, 1247, 1262, 1273, 1286, 1301, 1308, 1321, 1334, 1351, 1366, 1379, 1393, 1407, 1423, 1443, 1467, 1479, 1502, 1519, 1537, 1560, 1578, 1601, 1624, 1646, 1667, 1682, 1701, 1720, 1744, 1762, 1779, 1797, 1807, 1821, 1846, 1865, 1885, 1910, 1930, 1955, 1980, 2004, 2027, 2044, 2065, 2086, 2112, 2132, 2151, 2171, 2182, 2191, 2201, 2214, 2230, 2242, 2256, 2272, 2290, 2310, 2332, 2346, 2361, 2369, 2375, 2389, 2404, 2414, 2430, 2445, 2455, 2462, 2470, 2477, 2486, 2499, 2515, 2530, 2539, 2550, 2559, 2568, 2581, 2590, 2603, 2616, 2623, 2633, 2648, 2656}190+var _actionType_index = [...]uint16{0, 9, 17, 25, 35, 57, 77, 84, 92, 110, 118, 127, 144, 165, 180, 201, 225, 240, 258, 267, 287, 301, 316, 336, 351, 371, 391, 410, 428, 442, 454, 470, 486, 507, 529, 544, 558, 572, 585, 602, 610, 623, 639, 651, 659, 673, 687, 704, 715, 726, 740, 758, 775, 782, 801, 823, 835, 849, 858, 873, 885, 898, 909, 920, 932, 946, 967, 982, 995, 1012, 1030, 1046, 1058, 1070, 1083, 1098, 1112, 1124, 1136, 1153, 1160, 1172, 1177, 1187, 1196, 1207, 1218, 1231, 1246, 1257, 1270, 1285, 1292, 1305, 1318, 1335, 1350, 1363, 1377, 1391, 1407, 1427, 1451, 1463, 1486, 1503, 1521, 1544, 1562, 1585, 1608, 1630, 1651, 1666, 1685, 1709, 1727, 1744, 1762, 1772, 1786, 1811, 1830, 1850, 1875, 1895, 1920, 1945, 1969, 1992, 2009, 2030, 2056, 2076, 2095, 2115, 2126, 2135, 2145, 2158, 2174, 2186, 2200, 2216, 2234, 2254, 2276, 2290, 2305, 2313, 2319, 2333, 2348, 2358, 2374, 2389, 2399, 2406, 2414, 2421, 2430, 2443, 2459, 2474, 2483, 2494, 2503, 2512, 2525, 2534, 2547, 2560, 2567, 2577, 2592, 2600}191 192 func (i actionType) String() string {193 if i < 0 || i >= actionType(len(_actionType_index)-1) {194 return "actionType(" + strconv.FormatInt(int64(i), 10) + ")"3 unmodified linesmodified:src/chunklist.go-15 removed
97 unmodified lines98 cl.chunks = nil99 cl.mutex.Unlock()100 }101 102-// Retransform iterates all items and applies fn to each one.103-// The done callback runs under the lock to safely update shared state.104-func (cl *ChunkList) Retransform(fn func(*Item), done func()) {105- cl.mutex.Lock()106- for _, chunk := range cl.chunks {107- for i := 0; i < chunk.count; i++ {108- fn(&chunk.items[i])109- }110- }111- if done != nil {112- done()113- }114- cl.mutex.Unlock()115-}116-102 // Snapshot returns immutable snapshot of the ChunkList103 func (cl *ChunkList) Snapshot(tail int) ([]*Chunk, int, bool) {104 cl.mutex.Lock()105 50 unmodified linesmodified:src/core.go+30 added-66 removed
110 unmodified lines111 // Chunk list112 cache := NewChunkCache()113 var chunkList *ChunkList114 var itemIndex int32115- // transformItem applies with-nth transformation to an item's raw data.116- // It handles ANSI token propagation using prevLineAnsiState for cross-line continuity.117- transformItem := func(item *Item, data []byte, transformer func([]Token, int32) string, index int32) {118- tokens := Tokenize(byteString(data), opts.Delimiter)119- if opts.Ansi && len(tokens) > 1 {120- var ansiState *ansiState121- if prevLineAnsiState != nil {122- ansiStateDup := *prevLineAnsiState123- ansiState = &ansiStateDup124- }125- for _, token := range tokens {126- prevAnsiState := ansiState127- _, _, ansiState = extractColor(token.text.ToString(), ansiState, nil)128- if prevAnsiState != nil {129- token.text.Prepend("\x1b[m" + prevAnsiState.ToString())130- } else {131- token.text.Prepend("\x1b[m")132- }133- }134- }135- transformed := transformer(tokens, index)136- item.text, item.colors = ansiProcessor(stringBytes(transformed))137-138- // We should not trim trailing whitespaces with background colors139- var maxColorOffset int32140- if item.colors != nil {141- for _, ansi := range *item.colors {142- if ansi.color.bg >= 0 {143- maxColorOffset = max(maxColorOffset, ansi.offset[1])144- }145- }146- }147- item.text.TrimTrailingWhitespaces(int(maxColorOffset))148- }149-150- var nthTransformer func([]Token, int32) string115 if opts.WithNth == nil {116 chunkList = NewChunkList(cache, func(item *Item, data []byte) bool {117 item.text, item.colors = ansiProcessor(data)118 item.text.Index = itemIndex119 itemIndex++120 return true121 })122 } else {159- nthTransformer = opts.WithNth(opts.Delimiter)123+ nthTransformer := opts.WithNth(opts.Delimiter)124 chunkList = NewChunkList(cache, func(item *Item, data []byte) bool {161- currentTransformer := nthTransformer162- if currentTransformer == nil {163- item.text, item.colors = ansiProcessor(data)164- } else {165- transformItem(item, data, currentTransformer, itemIndex)125+ tokens := Tokenize(byteString(data), opts.Delimiter)126+ if opts.Ansi && len(tokens) > 1 {127+ var ansiState *ansiState128+ if prevLineAnsiState != nil {129+ ansiStateDup := *prevLineAnsiState130+ ansiState = &ansiStateDup131+ }132+ for _, token := range tokens {133+ prevAnsiState := ansiState134+ _, _, ansiState = extractColor(token.text.ToString(), ansiState, nil)135+ if prevAnsiState != nil {136+ token.text.Prepend("\x1b[m" + prevAnsiState.ToString())137+ } else {138+ token.text.Prepend("\x1b[m")139+ }140+ }141 }142+ transformed := nthTransformer(tokens, itemIndex)143+ item.text, item.colors = ansiProcessor(stringBytes(transformed))144+145+ // We should not trim trailing whitespaces with background colors146+ var maxColorOffset int32147+ if item.colors != nil {148+ for _, ansi := range *item.colors {149+ if ansi.color.bg >= 0 {150+ maxColorOffset = max(maxColorOffset, ansi.offset[1])151+ }152+ }153+ }154+ item.text.TrimTrailingWhitespaces(int(maxColorOffset))155 item.text.Index = itemIndex156 item.origText = &data157 itemIndex++158 return true260 unmodified lines419 var command *commandSpec420 var environ []string421 var changed bool422 headerLinesChanged := false435- withNthChanged := false423 switch val := value.(type) {424 case searchRequest:425 sort = val.sort426 command = val.command18 unmodified lines445 headerUpdated = false446 headerLinesChanged = true447 bump = true448 }462- if val.withNth != nil {463- newTransformer := val.withNth.fn464- // Reset cross-line ANSI state before re-processing all items465- lineAnsiState = nil466- prevLineAnsiState = nil467- chunkList.Retransform(func(item *Item) {468- origBytes := *item.origText469- savedIndex := item.Index()470- if newTransformer != nil {471- transformItem(item, origBytes, newTransformer, savedIndex)472- } else {473- item.text, item.colors = ansiProcessor(origBytes)474- }475- item.text.Index = savedIndex476- item.transformed = nil477- }, func() {478- nthTransformer = newTransformer479- })480- withNthChanged = true481- bump = true482- }449 if bump {450 patternCache = make(map[string]*Pattern)451 cache.Clear()452 inputRevision.bumpMinor()35 unmodified lines488 terminal.UpdateHeader(GetItems(snapshot, int(headerLines)))489 } else {490 terminal.UpdateHeader(nil)491 }526- } else if withNthChanged && headerLines > 0 {527- terminal.UpdateHeader(GetItems(snapshot, int(headerLines)))492 }493 matcher.Reset(snapshot, input(), true, !reading, sort, snapshotRevision)494 delay = false495 53 unmodified linesmodified:src/options.go+1 added-9 removed
585 unmodified lines586 Nth []Range587 FreezeLeft int588 FreezeRight int589 WithNth func(Delimiter) func([]Token, int32) string590- WithNthExpr string590 AcceptNth func(Delimiter) func([]Token, int32) string591 Delimiter Delimiter592 Sort int593 Raw bool1031 unmodified lines1625 )1626 1627 func init() {1628 executeRegexp = regexp.MustCompile(1630- `(?si)[:+](become|execute(?:-multi|-silent)?|reload(?:-sync)?|preview|(?:change|bg-transform|transform)-(?:query|prompt|(?:border|list|preview|input|header|footer)-label|header-lines|header|footer|search|with-nth|nth|pointer|ghost)|bg-transform|transform|change-(?:preview-window|preview|multi)|(?:re|un|toggle-)bind|pos|put|print|search|trigger)`)1629+ `(?si)[:+](become|execute(?:-multi|-silent)?|reload(?:-sync)?|preview|(?:change|bg-transform|transform)-(?:query|prompt|(?:border|list|preview|input|header|footer)-label|header-lines|header|footer|search|nth|pointer|ghost)|bg-transform|transform|change-(?:preview-window|preview|multi)|(?:re|un|toggle-)bind|pos|put|print|search|trigger)`)1630 splitRegexp = regexp.MustCompile("[,:]+")1631 actionNameRegexp = regexp.MustCompile("(?i)^[a-z-]+")1632 }1633 434 unmodified lines2068 case "change-multi":2069 return actChangeMulti2070 case "change-nth":2071 return actChangeNth2073- case "change-with-nth":2074- return actChangeWithNth2072 case "pos":2073 return actPosition2074 case "execute":2075 return actExecute28 unmodified lines2104 case "transform-ghost":2105 return actTransformGhost2106 case "transform-nth":2107 return actTransformNth2111- case "transform-with-nth":2112- return actTransformWithNth2108 case "transform-pointer":2109 return actTransformPointer2110 case "transform-prompt":2111 return actTransformPrompt24 unmodified lines2136 case "bg-transform-ghost":2137 return actBgTransformGhost2138 case "bg-transform-nth":2139 return actBgTransformNth2145- case "bg-transform-with-nth":2146- return actBgTransformWithNth2140 case "bg-transform-pointer":2141 return actBgTransformPointer2142 case "bg-transform-prompt":2143 return actBgTransformPrompt633 unmodified lines2777 }2778 if opts.WithNth, err = nthTransformer(str); err != nil {2779 return err2780 }2788- opts.WithNthExpr = str2781 case "--accept-nth":2782 str, err := nextString("nth expression required")2783 if err != nil {2784 return err1105 unmodified linesmodified:src/terminal.go+1 added-57 removed
338 unmodified lines339 freezeRight int340 nthAttr tui.Attr341 nth []Range342 nthCurrent []Range343- withNthExpr string344- withNthEnabled bool343 acceptNth func([]Token, int32) string344 tabstop int345 margin [4]sizeSpec346 padding [4]sizeSpec36 unmodified lines383 hasFocusActions bool384 hasLoadActions bool385 hasResizeActions bool386 triggerLoad bool389- filterSelection bool387 reading bool388 running *util.AtomicBool389 failed *string390 jumping jumpMode159 unmodified lines550 actChangeInputLabel551 actChangeListLabel552 actChangeMulti553 actChangeNth557- actChangeWithNth554 actChangePointer555 actChangePreview556 actChangePreviewLabel557 actChangePreviewWindow77 unmodified lines635 actTransformFooterLabel636 actTransformInputLabel637 actTransformListLabel638 actTransformNth643- actTransformWithNth639 actTransformPointer640 actTransformPreviewLabel641 actTransformPrompt642 actTransformQuery11 unmodified lines654 actBgTransformFooterLabel655 actBgTransformInputLabel656 actBgTransformListLabel657 actBgTransformNth663- actBgTransformWithNth658 actBgTransformPointer659 actBgTransformPreviewLabel660 actBgTransformPrompt661 actBgTransformQuery58 unmodified lines720 actTransformFooterLabel,721 actTransformInputLabel,722 actTransformListLabel,723 actTransformNth,730- actTransformWithNth,724 actTransformPointer,725 actTransformPreviewLabel,726 actTransformPrompt,727 actTransformQuery,8 unmodified lines736 actBgTransformFooterLabel,737 actBgTransformInputLabel,738 actBgTransformListLabel,739 actBgTransformNth,747- actBgTransformWithNth,740 actBgTransformPointer,741 actBgTransformPreviewLabel,742 actBgTransformPrompt,743 actBgTransformQuery,21 unmodified lines765 file bool766 raw bool767 }768 777-type withNthSpec struct {778- fn func([]Token, int32) string // nil = clear (restore original)779-}780-769 type searchRequest struct {770 sort bool771 sync bool772 nth *[]Range785- withNth *withNthSpec773 headerLines *int774 command *commandSpec775 environ []string776 changed bool302 unmodified lines1079 freezeRight: opts.FreezeRight,1080 nthAttr: opts.Theme.Nth.Attr,1081 nth: opts.Nth,1082 nthCurrent: opts.Nth,1096- withNthExpr: opts.WithNthExpr,1097- withNthEnabled: opts.WithNth != nil,1083 tabstop: opts.Tabstop,1084 raw: opts.Raw,1085 hasStartActions: false,1086 hasResultActions: false,263 unmodified lines1350 env = append(env, "FZF_DIRECTION="+direction)1351 if len(t.nthCurrent) > 0 {1352 env = append(env, "FZF_NTH="+RangesToString(t.nthCurrent))1353 }1369- if len(t.withNthExpr) > 0 {1370- env = append(env, "FZF_WITH_NTH="+t.withNthExpr)1371- }1354 if t.raw {1355 val := "0"1356 if t.isCurrentItemMatch() {1357 val = "1"484 unmodified lines1842 }1843 t.revision = newRevision1844 t.version++1845 }1864- if t.filterSelection && t.multi > 0 && len(t.selected) > 0 {1865- t.filterSelection = false1866- matchMap := t.resultMerger.ToMap()1867- filtered := make(map[int32]selectedItem)1868- for k, v := range t.selected {1869- if _, matched := matchMap[k]; matched {1870- filtered[k] = v1871- }1872- }1873- t.selected = filtered1874- }1875- t.filterSelection = false1846 if t.triggerLoad {1847 t.triggerLoad = false1848 t.eventChan <- tui.Load.AsEvent()1849 }4071 unmodified lines5921 // These variables are defined outside the loop to be accessible from closures5922 events := []util.EventType{}5923 changed := false5924 var newNth *[]Range5955- var newWithNth *withNthSpec5925 var newHeaderLines *int5926 req := func(evts ...util.EventType) {5927 for _, event := range evts {5928 events = append(events, event)9 unmodified lines5938 var reloadSync bool5939 events = []util.EventType{}5940 changed = false5941 newNth = nil5973- newWithNth = nil5942 newHeaderLines = nil5943 beof := false5944 queryChanged := false5945 denylist := []int32{}383 unmodified lines6329 t.nthCurrent = *newNth6330 t.forceRerenderList()6331 }6332 })6365- case actChangeWithNth, actTransformWithNth, actBgTransformWithNth:6366- if !t.withNthEnabled {6367- break Action6368- }6369- capture(true, func(expr string) {6370- tokens := strings.Split(expr, "|")6371- withNthExpr := tokens[0]6372- if len(tokens) > 1 {6373- a.a = strings.Join(append(tokens[1:], tokens[0]), "|")6374- }6375- if withNthExpr != t.withNthExpr {6376- if len(withNthExpr) == 0 {6377- newWithNth = &withNthSpec{fn: nil}6378- } else if factory, err := nthTransformer(withNthExpr); err == nil {6379- newWithNth = &withNthSpec{fn: factory(t.delimiter)}6380- } else {6381- return6382- }6383- t.withNthExpr = withNthExpr6384- t.filterSelection = true6385- changed = true6386- t.forceRerenderList()6387- }6388- })6333 case actChangeQuery:6334 t.input = []rune(a.a)6335 t.cx = len(t.input)6336 case actChangeHeader, actTransformHeader, actBgTransformHeader:1139 unmodified lines7476 7477 reload := changed || newCommand != nil7478 var reloadRequest *searchRequest7479 if reload {7536- reloadRequest = &searchRequest{sort: t.sort, sync: reloadSync, nth: newNth, withNth: newWithNth, headerLines: newHeaderLines, command: newCommand, environ: t.environ(), changed: changed, denylist: denylist, revision: t.resultMerger.Revision()}7480+ reloadRequest = &searchRequest{sort: t.sort, sync: reloadSync, nth: newNth, headerLines: newHeaderLines, command: newCommand, environ: t.environ(), changed: changed, denylist: denylist, revision: t.resultMerger.Revision()}7481 }7482 7483 // Dispatch queued background requests7484 t.dispatchAsync()227 unmodified linesmodified:test/test_core.rb-106 removed
1743 unmodified lines1744 assert_equal 4, lines.match_count1745 end1746 end1747 1748- def test_change_with_nth1749- input = [1750- 'foo bar baz',1751- 'aaa bbb ccc',1752- 'xxx yyy zzz'1753- ]1754- writelines(input)1755- # Start with field 1 only, cycle through fields, verify $FZF_WITH_NTH via prompt1756- tmux.send_keys %(#{FZF} --with-nth 1 --bind 'space:change-with-nth(2|3|1),result:transform-prompt:echo "[$FZF_WITH_NTH]> "' < #{tempname}), :Enter1757- tmux.until do |lines|1758- assert_equal 3, lines.item_count1759- assert lines.any_include?('[1]>')1760- assert lines.any_include?('foo')1761- refute lines.any_include?('bar')1762- end1763- tmux.send_keys :Space1764- tmux.until do |lines|1765- assert lines.any_include?('[2]>')1766- assert lines.any_include?('bar')1767- refute lines.any_include?('foo')1768- end1769- tmux.send_keys :Space1770- tmux.until do |lines|1771- assert lines.any_include?('[3]>')1772- assert lines.any_include?('baz')1773- refute lines.any_include?('bar')1774- end1775- tmux.send_keys :Space1776- tmux.until do |lines|1777- assert lines.any_include?('[1]>')1778- assert lines.any_include?('foo')1779- refute lines.any_include?('bar')1780- end1781- end1782-1783- def test_change_with_nth_clear1784- tmux.send_keys %(echo -e 'a b c\nd e f' | #{FZF} --with-nth 1 --bind 'space:change-with-nth()'), :Enter1785- tmux.until do |lines|1786- assert_equal 2, lines.item_count1787- assert lines.any_include?('a')1788- refute lines.any_include?('b')1789- end1790- tmux.send_keys :Space1791- tmux.until do |lines|1792- assert lines.any_include?('a b c')1793- end1794- end1795-1796- def test_transform_with_nth_search1797- input = [1798- 'alpha bravo charlie',1799- 'delta echo foxtrot',1800- 'golf hotel india'1801- ]1802- writelines(input)1803- tmux.send_keys %(#{FZF} --with-nth 1 --bind 'space:transform-with-nth(2)' -q bravo < #{tempname}), :Enter1804- tmux.until do |lines|1805- assert_equal 0, lines.match_count1806- end1807- tmux.send_keys :Space1808- tmux.until do |lines|1809- assert_equal 1, lines.match_count1810- end1811- end1812-1813- def test_bg_transform_with_nth_output1814- tmux.send_keys %(echo -e 'a b c\nd e f' | #{FZF} --with-nth 2 --bind 'space:bg-transform-with-nth(3)'), :Enter1815- tmux.until do |lines|1816- assert_equal 2, lines.item_count1817- assert lines.any_include?('b')1818- end1819- tmux.send_keys :Space1820- tmux.until do |lines|1821- assert lines.any_include?('c')1822- end1823- tmux.send_keys :Enter1824- tmux.until { |lines| assert lines.any_include?('a b c') || lines.any_include?('d e f') }1825- end1826-1827- def test_change_with_nth_selection1828- # Items: field1 has unique values, field2 has 'match' or 'miss'1829- input = [1830- 'one match x',1831- 'two miss y',1832- 'three match z'1833- ]1834- writelines(input)1835- # Start showing field 2 (match/miss), query 'match', select all matches, then switch to field 31836- tmux.send_keys %(#{FZF} --with-nth 2 --multi --bind 'ctrl-a:select-all,space:change-with-nth(3)' -q match < #{tempname}), :Enter1837- tmux.until do |lines|1838- assert_equal 2, lines.match_count1839- end1840- # Select all matching items1841- tmux.send_keys 'C-a'1842- tmux.until do |lines|1843- assert lines.any_include?('(2)')1844- end1845- # Now change with-nth to field 3; 'x' and 'z' don't contain 'match'1846- tmux.send_keys :Space1847- tmux.until do |lines|1848- assert_equal 0, lines.match_count1849- # Selections of non-matching items should be cleared1850- assert lines.any_include?('(0)')1851- end1852- end1853-1748 def test_env_vars1749 def env_vars1750 return {} unless File.exist?(tempname)1751 510 unmodified linesmodified:CHANGELOG.md-8 removed
1 CHANGELOG2 =========3 4-0.69.05-------6-- Added `change-with-nth` action for dynamically changing the `--with-nth` option7- ```sh8- echo -e "a b c\nd e f\ng h i" | fzf --with-nth .. \9- --bind 'space:change-with-nth(1|2|3|1,3|2,3|)'10- ```11-4 0.68.05 ------6 - Implemented word wrapping in the list section7 - Added `--wrap=word` (or `--wrap-word`) option and `toggle-wrap-word` action for word-level line wrapping in the list section3167 unmodified lines