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;
}
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
New contributor
add a comment |
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
New contributor
add a comment |
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
New contributor
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
command-line fzf
New contributor
New contributor
New contributor
asked 57 mins ago
Budiman SnowmanBudiman Snowman
1
1
New contributor
New contributor
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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.
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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