Skip to content
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

[FEATURE] Be able to insert newlines in copied paths #174

Open
ZPMU opened this issue Sep 26, 2023 · 2 comments
Open

[FEATURE] Be able to insert newlines in copied paths #174

ZPMU opened this issue Sep 26, 2023 · 2 comments
Assignees

Comments

@ZPMU
Copy link

ZPMU commented Sep 26, 2023

Is your feature request related to a problem? Please describe.
I want to take a path and convert it two times, seperated by a newline or some other seperation char: First it should converted like done by "Copy long UNC path", then again like done by "Copy samba path", both concatenated by newline.
Problem: Don't know how to do after reading https://github.com/clechasseur/pathcopycopy/wiki/Custom-Commands-%3A-Expert-Mode

Describe the solution you'd like
I have no clue about the expert mode, but my gut says that it ist possible by that means, resorting to two of the Base Commands.

Describe alternatives you've considered
Build the two paths manually by means of a complicated RegExp, omitting the savvy hidden in both Base Commands.

Additional context
The existing stack manipulating elements let me tempt to apply knowledge about UPN based calculators/languages.
From my experience with UPN, I think it should be somewhat like
"Duplicate top stack element"
"Convert top stack element to Samba"
"Swap two topmost stack elements"
"Convert top stack element to UNC"
"Push newline to stack"
"Swap two topmost stack elements"
"Concatenate two topmost stack elements"
"Concatenate two topmost stack elements"

Supposing that each Base command take a path from stack, an push the treated result to stack.
Supposing that initial file path is present on stack and final result (to be deposited in clipboard) shall be left on the stack.

@clechasseur clechasseur self-assigned this Sep 28, 2023
@clechasseur
Copy link
Owner

Indeed, this is almost possible with stack manipulation. Here's an example:

CopyUNCAndSambaPaths.zip

However, this example pushes the string " | " between the two paths. This is because there doesn't seem to be a way to push a true newline onto the stack.

I'll keep this open to see if there's a way to add this.

@clechasseur clechasseur changed the title [FEATURE] More detailed documentation for Expert Mode [FEATURE] Be able to insert newlines in copied paths Sep 28, 2023
@ZPMU
Copy link
Author

ZPMU commented Sep 29, 2023

Thanks, that clarifys some points. I think that nevertheless the docs are a little bit narrow. I think, more examples may give a glimpse of the concepts.
In the meantime I found a solution similar, but not that concise. But indeed, I also didn't find a solution to use a newline as seperation string. "\n" or "$n" or variations with more than one "" or with "\r" or "\r\n" or the like didn't make it.
So this issue forks into the two tasks "give more examples in the docs" and "let the user insert line breaks onto the stack", IMHO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants