fzf: How to return “ID” / line numbers?Get line numbers for lines with empty fieldsgrep - recognize...

Word ending in "-ine" for rat-like

What is "oversubscription" in Networking?

Is it okay to submit a paper from a master's thesis without informing the advisor?

Different budgets within roommate group

Why wasn't EBCDIC designed with contiguous alphanumeric characters?

Thin wall to block LED light from hitting photodiode?

What kind of jet plane is this?

Why did NASA wet the road in front of the Space Shuttle crawler?

Does a return economy-class seat between London and San Francisco release 5.28 tonnes of CO2 equivalents?

How could an armless race establish civilization?

Comment traduire « That screams X »

I hit a pipe with a mower and now it won't turn

Losing queen and then winning the game

Sacrifice blocking creature before damage is dealt no longer working (MtG Arena)?

Security Patch SUPEE-11155 - Possible issues?

What do you call a notepad used to keep a record?

Do home values typically rise and fall at a consistent percent?

Find the radius of the hoop.

How can I tell what kind of genitals people have without gender?

Script executes loop only once

Put my student loan in parents’ second mortgage - help?

Are gliders susceptible to bird strikes?

What's the safest way to inform a new user of their password on an invite-only website?

I just started should I accept a farewell lunch for a coworker I don't know?



fzf: How to return “ID” / line numbers?


Get line numbers for lines with empty fieldsgrep - recognize carriage return as new lineCopying files from command line to clipboardCommand line method to find repeat-word typos, with line numbersHow can I set a return code from the command line without exiting my SSH client?How can I calculate and format a date duration using GNU tools, not a result date?Replace a line with the full text of a second fileHow to find lines with certain numbersHow to search for a match, then a non-match on that line, but include context lines for matched line?How to manipulate numbers in a file"?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I have a set of lines (item + description) which I want to run through fzf -m. For example:



item1: Some description
item1: Another description
item2: Yet another description


After selection I would like fzf to return the line numbers (e.g. 1 3) instead of the lines themselves because: 1) I don't want to include the description; 2) The items are not unique.



True, I can just prefix the lines with the line numbers first:



1: item1: Some description
2: item1: Another description
3: item2: Yet another description


then extract it later. But I think it would be great if fzf can be instructed to do this. It will make some things easier and open some more possibilities for the tool.










share|improve this question







New contributor



Budiman Snowman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


























    0















    I have a set of lines (item + description) which I want to run through fzf -m. For example:



    item1: Some description
    item1: Another description
    item2: Yet another description


    After selection I would like fzf to return the line numbers (e.g. 1 3) instead of the lines themselves because: 1) I don't want to include the description; 2) The items are not unique.



    True, I can just prefix the lines with the line numbers first:



    1: item1: Some description
    2: item1: Another description
    3: item2: Yet another description


    then extract it later. But I think it would be great if fzf can be instructed to do this. It will make some things easier and open some more possibilities for the tool.










    share|improve this question







    New contributor



    Budiman Snowman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      0












      0








      0








      I have a set of lines (item + description) which I want to run through fzf -m. For example:



      item1: Some description
      item1: Another description
      item2: Yet another description


      After selection I would like fzf to return the line numbers (e.g. 1 3) instead of the lines themselves because: 1) I don't want to include the description; 2) The items are not unique.



      True, I can just prefix the lines with the line numbers first:



      1: item1: Some description
      2: item1: Another description
      3: item2: Yet another description


      then extract it later. But I think it would be great if fzf can be instructed to do this. It will make some things easier and open some more possibilities for the tool.










      share|improve this question







      New contributor



      Budiman Snowman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I have a set of lines (item + description) which I want to run through fzf -m. For example:



      item1: Some description
      item1: Another description
      item2: Yet another description


      After selection I would like fzf to return the line numbers (e.g. 1 3) instead of the lines themselves because: 1) I don't want to include the description; 2) The items are not unique.



      True, I can just prefix the lines with the line numbers first:



      1: item1: Some description
      2: item1: Another description
      3: item2: Yet another description


      then extract it later. But I think it would be great if fzf can be instructed to do this. It will make some things easier and open some more possibilities for the tool.







      command-line fzf






      share|improve this question







      New contributor



      Budiman Snowman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share|improve this question







      New contributor



      Budiman Snowman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share|improve this question




      share|improve this question






      New contributor



      Budiman Snowman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      asked 57 mins ago









      Budiman SnowmanBudiman Snowman

      1




      1




      New contributor



      Budiman Snowman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      New contributor




      Budiman Snowman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.
























          0






          active

          oldest

          votes














          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          Budiman Snowman is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f527163%2ffzf-how-to-return-id-line-numbers%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Budiman Snowman is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Budiman Snowman is a new contributor. Be nice, and check out our Code of Conduct.













          Budiman Snowman is a new contributor. Be nice, and check out our Code of Conduct.












          Budiman Snowman is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f527163%2ffzf-how-to-return-id-line-numbers%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

          Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

          Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...