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

Support user customizable "Copy <> to clipboard" functions #437

Closed
Vdragon opened this Issue Apr 19, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@Vdragon
Contributor

Vdragon commented Apr 19, 2015

_497
Hi Git Cola developers, please support user customizable "Copy <> to clipboard" functions so that user can easily customize their prefered "Copy <> to clipboard", for example I could copy <topic> <separator> as commit title while reserve the flexibility of which <separator> I prefer(which is not changeable when hardcoded in code), the config UI could be like:
_498
(Screenshot from Create Link 0.2.9 Chrome extension)

Thanks in advance!

@Vdragon Vdragon added the help wanted label Apr 19, 2015

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Apr 24, 2015

Member

This sounds pretty cool. In this example, would the path itself be the %text_n% and then a urlencoded version of the path would be the %url%? Is %htmlEscapedText% the same as %url% since we only have a path?

Is %title% the Name column in the table? I'm guessing you have relative paths and you want to add some helpers for formatting these paths. I guess those variables are just examples. In which case we could leverage the shell syntax and have variables like...

$basename # the path without directory components
$basename_noext # the path without directory and filename extension
$dirname # the relative directory path
$abspath # absolute path
$url # urlencoded path
$text # urlencoded name column

then someone could have $basename: as a configured format. Or, <a href="$url">$text</a> or [$text]($url). Is that what you were imagining?

Member

davvid commented Apr 24, 2015

This sounds pretty cool. In this example, would the path itself be the %text_n% and then a urlencoded version of the path would be the %url%? Is %htmlEscapedText% the same as %url% since we only have a path?

Is %title% the Name column in the table? I'm guessing you have relative paths and you want to add some helpers for formatting these paths. I guess those variables are just examples. In which case we could leverage the shell syntax and have variables like...

$basename # the path without directory components
$basename_noext # the path without directory and filename extension
$dirname # the relative directory path
$abspath # absolute path
$url # urlencoded path
$text # urlencoded name column

then someone could have $basename: as a configured format. Or, <a href="$url">$text</a> or [$text]($url). Is that what you were imagining?

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Apr 24, 2015

Member

Related-to: #436

Member

davvid commented Apr 24, 2015

Related-to: #436

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Apr 24, 2015

Member

Related-to: #435

Member

davvid commented Apr 24, 2015

Related-to: #435

davvid added a commit to davvid/git-cola that referenced this issue Sep 20, 2017

settings: add a "copy formats" settings field
Related-to: git-cola#437
Signed-off-by: David Aguilar <davvid@gmail.com>

davvid added a commit to davvid/git-cola that referenced this issue Sep 20, 2017

Merge branch 'custom-copy'
Add support for custom "Copy ... to Clipboard" actions.

* custom-copy:
  status: add support for custom copy actions
  settings: add a "copy formats" settings field
  status: move the "Copy" sub-menu to the bottom
  main: transfer menu ownership to the edit menu
  status: add "Copy Basename to Clipboard" action
  status: make methods into standalone functions

Closes git-cola#435
Closes git-cola#437
Signed-off-by: David Aguilar <davvid@gmail.com>

@davvid davvid closed this in 2f2fd5f Sep 20, 2017

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