View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002499 | Double Commander | Default | public | 2020-06-23 14:30 | 2023-07-07 17:16 |
| Reporter | nicker | Assigned To | Alexx2000 | ||
| Priority | normal | Severity | feature | Reproducibility | N/A |
| Status | closed | Resolution | no change required | ||
| Projection | none | ETA | none | ||
| Platform | X64 | OS | Windows | OS Version | Windows 10 2004 |
| Product Version | 1.0.0 (trunk) | ||||
| Summary | 0002499: Add option to copy filename to clipboard using slashes instead of backlashes under Windows | ||||
| Description | That includes: Copy filename only [CTRL+SHIFT+X] Copy full file path [CTRL+SHIFT+C] Most times I find myself changing backslashes to slashes. Windows has almost full compatibility to forward slash. It is worth thinking making it the default state. | ||||
| Tags | No tags attached. | ||||
| Fixed in Revision | |||||
| Operating system | |||||
| Widgetset | |||||
| Architecture | |||||
|
|
> It is worth thinking making it the default state. O_o It's strange idea... "\" is path delimiter on Win by default. Save text between ----------- as (for example) "Back2Slash.lua": ----------- -- Back2Slash.lua (cross-platform) -- 2020.06.24 -- -- Copy seleted filenames to clipboard. -- One parameter: %LU local params = {...} if params[1] == nil then Dialogs.MessageBox('Check parameter.', 'Back2Slash.lua', 0x0030) return end local h, err = io.open(params[1], 'r') if h == nil then Dialogs.MessageBox('Error: ' .. err, 'Back2Slash.lua', 0x0030) return end local s = h:read('*a') h:close() if s == nil then Dialogs.MessageBox('Unknown error.', 'Back2Slash.lua', 0x0030) return end s = string.gsub(s, '[\r\n]+$', '') if SysUtils.PathDelim == '\\' then s = string.gsub(s, '\\', '/') end Clipbrd.SetAsText(s) ----------- now http://doublecmd.github.io/doc/en/toolbar.html : add button with internal command "cm_ExecuteScript" and two parameters: path-to-script\Back2Slash.lua %LU |
|
|
Very nice ! I wasn't aware of lua integration. I've used your script and overridden the default hotkey CTRL+SHIFT+C and I kept the toolbar hidden. so the desired outcome is completely achieved crookedly. That also "solves" issue 0001920 for me, since you can use the toolbar for that. I find it weird that creating new commands are tightly coupled to the toolbar |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2020-06-23 14:30 | nicker | New Issue | |
| 2020-06-24 00:07 | Skif_off | Note Added: 0003449 | |
| 2021-08-22 01:49 | nicker | Note Added: 0003794 | |
| 2023-01-08 19:28 | Alexx2000 | Assigned To | => Alexx2000 |
| 2023-01-08 19:28 | Alexx2000 | Status | new => closed |
| 2023-01-08 19:28 | Alexx2000 | Resolution | open => no change required |