-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add variable substitution to snippets #29
base: master
Are you sure you want to change the base?
Conversation
I'm confused as to why git thinks this is a conflict, it's a simple merge. |
Checked out your branch but didn't work so far. It just copied the text of the whole snippet together with the replacement snippet. Just used the example you gave in the readme file (%filltext:name=DIRECTORY:default=root_tmpdir%). |
No, I made sure it didn't add any new requirements. Is it getting far enough to prompt you for the substitution value? Meaning it's found and deciphered the filltext, but then fails to do the replacement, in that case. |
No, unfortunately not. I get the list with all files, then choose one by start typing the name, press enter than the text is directly pasted to the cursor's position. When I execute the texpander.sh script directly on the console, I get the sentence with the variable twice. First separately before the text and once in the text. |
Hm. I found that the underscore in the default value keeps the default value from getting used, but otherwise substitution works as expected. I wonder if there's a difference in how our grep or sed work. grep (GNU grep) 2.27 Can you try it with this snippet?:
(test1 and test2 are on the same line.) |
Okay, got a little bit further: When I start the script from console, I get the forms for entering the values. But not if I start it with my shortcut. But this could be a problem not related to this issue. So it seems like it is working :) Thanks for the help! |
Is working now. May have been some issue with an older lib. Thanks for the work! |
Oh, sweet. I figured you'd given up on it as being too complicated. |
Is this going to be merged at all? |
I really like the concept even though it goes beyond my personal needs. I
haven't had the time lately to focus on updating Texpander. So, it's a cool
feature but it sort of takes things beyond my own personal needs.
…On Tue, May 7, 2019 at 12:57 PM MyriaCore ***@***.***> wrote:
Is this going to be merged at all?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#29 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHKPMC3S3SDKZMWXVQ3VPTPUGYGLANCNFSM4FHVZU5Q>
.
|
Sounds like we should establish a branch or a fork for Texpander-"powerusers" 🤔 |
That's totally cool with me. :)
…On Tue, May 7, 2019 at 4:13 PM Nicolai Weitkemper ***@***.***> wrote:
Sounds like we should establish a branch or a fork for
Texpander-"powerusers" 🤔
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#29 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHKPMAX2JFJYZEGDQVVSF3PUHPEVANCNFSM4FHVZU5Q>
.
|
@NicoWeio No joke, I had a few more ideas of my own for this kinda stuff. Where do you think we should have it? |
I've been trying to decide if I want to take on maintaining a fork. I guess I might as well, since I wrote the complicated patch. |
Fair enough, let us know if you do decide to make it. |
I've made enough changes to the base script that it's basically a fork already. I'm hosting it here on gitlab if any of you are interested. Notable changes so far:
I have a bunch of plans, for future features, and I add to it when the opportunity arises. It's a nice way for me to practice bash anyway. MR's are welcome, check it out if you're interested! |
If you guys are interested, I can try to get this merged into a poweruser branch. Ping me & let me know if this is the case. |
Looks awesome! I would definitely like to see that in a poweruser branch. |
Lee,
This has worked well in my testing, but I'm sure there are edge cases where it can act weird.
It doesn't depend on any new tools. I tried to make it as simple and elegant as possible within that constraint.
I tried using
zenity -forms
mode, but enter does nothing on that screen... it requires tabbing between fields and either tabbing to OK or using the mouse. I felt this was unacceptable, so I prompt for each variable separately to allow just hitting enter.I look forward to your feedback.