fzf: allow trimmed url [on hold]











up vote
-1
down vote

favorite












I trimmed url with this command (it's too long to display on screen)



echo 'https://example.com' | awk -v len=10 -F 't' 'BEGIN { OFS=FS  } { for (i=1; i<=NF; ++i) if (length($i)>len) $i = substr($i,1,len-3) "»"  }; 1'
https:/»


Then I pipe the output to fzf, how to make fzf understand the original url, I then take some actions on the full url - e.g: open the url link.



EDIT: the point is it's probably need some work from fzf to support this feature, it's only possible if we save orginal url somewhere before trimming but a support from fzf to trim url is more elegant.










share|improve this question















put on hold as unclear what you're asking by Michael Homer, Jeff Schaller, RalfFriedl, G-Man, Stephen Harris Dec 2 at 4:00


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.











  • 1




    Kindly mentioned what is expected output from input give
    – Praveen Kumar BS
    Dec 1 at 6:58










  • How in the world is fzf supposed to "understand" the original URL when you don't give it the original URL?
    – G-Man
    Dec 2 at 3:55










  • @G-Man: That's why I need support from fzf itself. Question gives representation of trimmed url that without support form fzf, fzf can't understand it.
    – Tuyen Pham
    2 days ago










  • You're missing my point.  If I'm thinking of a sentence, and I tell you that the first two words are "The cat", can you determine the rest of the sentence?  Of course not.  So my point is, how is it even theoretically possible for any piece of software to reconstruct information that it hasn't been given?
    – G-Man
    2 days ago












  • @G-Man: I understand what you're mentioning. I've just updated the question, I really don't want to trim and force fzf to understand the trimmed url, the question is about how to display trimmed url and do some actions on the original one that have support from fzf itself. So is it possible with fzf to do that? I found that currently It could not.
    – Tuyen Pham
    2 days ago

















up vote
-1
down vote

favorite












I trimmed url with this command (it's too long to display on screen)



echo 'https://example.com' | awk -v len=10 -F 't' 'BEGIN { OFS=FS  } { for (i=1; i<=NF; ++i) if (length($i)>len) $i = substr($i,1,len-3) "»"  }; 1'
https:/»


Then I pipe the output to fzf, how to make fzf understand the original url, I then take some actions on the full url - e.g: open the url link.



EDIT: the point is it's probably need some work from fzf to support this feature, it's only possible if we save orginal url somewhere before trimming but a support from fzf to trim url is more elegant.










share|improve this question















put on hold as unclear what you're asking by Michael Homer, Jeff Schaller, RalfFriedl, G-Man, Stephen Harris Dec 2 at 4:00


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.











  • 1




    Kindly mentioned what is expected output from input give
    – Praveen Kumar BS
    Dec 1 at 6:58










  • How in the world is fzf supposed to "understand" the original URL when you don't give it the original URL?
    – G-Man
    Dec 2 at 3:55










  • @G-Man: That's why I need support from fzf itself. Question gives representation of trimmed url that without support form fzf, fzf can't understand it.
    – Tuyen Pham
    2 days ago










  • You're missing my point.  If I'm thinking of a sentence, and I tell you that the first two words are "The cat", can you determine the rest of the sentence?  Of course not.  So my point is, how is it even theoretically possible for any piece of software to reconstruct information that it hasn't been given?
    – G-Man
    2 days ago












  • @G-Man: I understand what you're mentioning. I've just updated the question, I really don't want to trim and force fzf to understand the trimmed url, the question is about how to display trimmed url and do some actions on the original one that have support from fzf itself. So is it possible with fzf to do that? I found that currently It could not.
    – Tuyen Pham
    2 days ago















up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I trimmed url with this command (it's too long to display on screen)



echo 'https://example.com' | awk -v len=10 -F 't' 'BEGIN { OFS=FS  } { for (i=1; i<=NF; ++i) if (length($i)>len) $i = substr($i,1,len-3) "»"  }; 1'
https:/»


Then I pipe the output to fzf, how to make fzf understand the original url, I then take some actions on the full url - e.g: open the url link.



EDIT: the point is it's probably need some work from fzf to support this feature, it's only possible if we save orginal url somewhere before trimming but a support from fzf to trim url is more elegant.










share|improve this question















I trimmed url with this command (it's too long to display on screen)



echo 'https://example.com' | awk -v len=10 -F 't' 'BEGIN { OFS=FS  } { for (i=1; i<=NF; ++i) if (length($i)>len) $i = substr($i,1,len-3) "»"  }; 1'
https:/»


Then I pipe the output to fzf, how to make fzf understand the original url, I then take some actions on the full url - e.g: open the url link.



EDIT: the point is it's probably need some work from fzf to support this feature, it's only possible if we save orginal url somewhere before trimming but a support from fzf to trim url is more elegant.







linux text-processing awk command-line pipe






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago

























asked Nov 30 at 20:02









Tuyen Pham

513111




513111




put on hold as unclear what you're asking by Michael Homer, Jeff Schaller, RalfFriedl, G-Man, Stephen Harris Dec 2 at 4:00


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






put on hold as unclear what you're asking by Michael Homer, Jeff Schaller, RalfFriedl, G-Man, Stephen Harris Dec 2 at 4:00


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.










  • 1




    Kindly mentioned what is expected output from input give
    – Praveen Kumar BS
    Dec 1 at 6:58










  • How in the world is fzf supposed to "understand" the original URL when you don't give it the original URL?
    – G-Man
    Dec 2 at 3:55










  • @G-Man: That's why I need support from fzf itself. Question gives representation of trimmed url that without support form fzf, fzf can't understand it.
    – Tuyen Pham
    2 days ago










  • You're missing my point.  If I'm thinking of a sentence, and I tell you that the first two words are "The cat", can you determine the rest of the sentence?  Of course not.  So my point is, how is it even theoretically possible for any piece of software to reconstruct information that it hasn't been given?
    – G-Man
    2 days ago












  • @G-Man: I understand what you're mentioning. I've just updated the question, I really don't want to trim and force fzf to understand the trimmed url, the question is about how to display trimmed url and do some actions on the original one that have support from fzf itself. So is it possible with fzf to do that? I found that currently It could not.
    – Tuyen Pham
    2 days ago
















  • 1




    Kindly mentioned what is expected output from input give
    – Praveen Kumar BS
    Dec 1 at 6:58










  • How in the world is fzf supposed to "understand" the original URL when you don't give it the original URL?
    – G-Man
    Dec 2 at 3:55










  • @G-Man: That's why I need support from fzf itself. Question gives representation of trimmed url that without support form fzf, fzf can't understand it.
    – Tuyen Pham
    2 days ago










  • You're missing my point.  If I'm thinking of a sentence, and I tell you that the first two words are "The cat", can you determine the rest of the sentence?  Of course not.  So my point is, how is it even theoretically possible for any piece of software to reconstruct information that it hasn't been given?
    – G-Man
    2 days ago












  • @G-Man: I understand what you're mentioning. I've just updated the question, I really don't want to trim and force fzf to understand the trimmed url, the question is about how to display trimmed url and do some actions on the original one that have support from fzf itself. So is it possible with fzf to do that? I found that currently It could not.
    – Tuyen Pham
    2 days ago










1




1




Kindly mentioned what is expected output from input give
– Praveen Kumar BS
Dec 1 at 6:58




Kindly mentioned what is expected output from input give
– Praveen Kumar BS
Dec 1 at 6:58












How in the world is fzf supposed to "understand" the original URL when you don't give it the original URL?
– G-Man
Dec 2 at 3:55




How in the world is fzf supposed to "understand" the original URL when you don't give it the original URL?
– G-Man
Dec 2 at 3:55












@G-Man: That's why I need support from fzf itself. Question gives representation of trimmed url that without support form fzf, fzf can't understand it.
– Tuyen Pham
2 days ago




@G-Man: That's why I need support from fzf itself. Question gives representation of trimmed url that without support form fzf, fzf can't understand it.
– Tuyen Pham
2 days ago












You're missing my point.  If I'm thinking of a sentence, and I tell you that the first two words are "The cat", can you determine the rest of the sentence?  Of course not.  So my point is, how is it even theoretically possible for any piece of software to reconstruct information that it hasn't been given?
– G-Man
2 days ago






You're missing my point.  If I'm thinking of a sentence, and I tell you that the first two words are "The cat", can you determine the rest of the sentence?  Of course not.  So my point is, how is it even theoretically possible for any piece of software to reconstruct information that it hasn't been given?
– G-Man
2 days ago














@G-Man: I understand what you're mentioning. I've just updated the question, I really don't want to trim and force fzf to understand the trimmed url, the question is about how to display trimmed url and do some actions on the original one that have support from fzf itself. So is it possible with fzf to do that? I found that currently It could not.
– Tuyen Pham
2 days ago






@G-Man: I understand what you're mentioning. I've just updated the question, I really don't want to trim and force fzf to understand the trimmed url, the question is about how to display trimmed url and do some actions on the original one that have support from fzf itself. So is it possible with fzf to do that? I found that currently It could not.
– Tuyen Pham
2 days ago

















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Accessing regular linux commands in Huawei's Dopra Linux

Can't connect RFCOMM socket: Host is down

Kernel panic - not syncing: Fatal Exception in Interrupt