Bug 434052 - Add variable of file path in prefix of backup file
Summary: Add variable of file path in prefix of backup file
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: kate
Classification: Applications
Component: application (show other bugs)
Version: 20.12.2
Platform: unspecified All
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-06 09:21 UTC by Yuki
Modified: 2023-08-05 19:02 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuki 2021-03-06 09:21:51 UTC
It's more convenient if variable of file path (without drive letter on windows) is added in prefix of backup file to put it  in flexible location.

Example-----
Kate configuration =>
  Backup file prefix: C:/Backup/%{FilePath}/
  Backup file suffix: .bak
Edited file => C:/Programs/src/module1/ab.c
Expected behavior => Put backup file as C:/Backup/Programs/src/module1/ab.c.bak
Comment 1 Yuki 2021-03-07 02:51:35 UTC
>It's more convenient if variable of file path (without drive letter on windows)

I mean I would like to get base path in front of file name in file path as value of the variable.
Comment 2 Yuki 2021-06-08 23:08:35 UTC
As another idea, it may be more flexible if user can setup the back file name pattern by using variable (instead of setting up prefix and suffix) like following:

Example-----
/Backup/%{BasePath}/%{FileName}_%{Date:yyyyMMdd}-%{Time:HHmmss}.%{Extension}
Comment 3 Christoph Cullmann 2023-08-05 19:02:16 UTC
I don't think that is such a often used feature that it requires this amount of flexibility.

If you think otherwise, patches to add this are welcome, but I don't see that the team will spend work on that.

https://kate-editor.org/post/2020/2020-07-18-contributing-via-gitlab-merge-requests/