Closed tkkcc closed 1 year ago
Hi, thank you for pointing out. Yeah I feel it.
There are actually 3 key points:
wl-copy
). Though it needs to specify which clipboard application you'd like to use, looking for environmental variable or adding optional field to config would be enough, and I feel it deserves.In addition, as you mentioned, it'd be useful to be able to use wildcard in shell mode, so I implemented that on feature-shell-out
branch: It can execute e.g. :zip test test-*
. Tested on bash, zsh and fish. If interested, please give this a try.
So, sorry for my long reply, but as a conclusion for now, I'm going to try implementing
If you have any comments, please let me know.
Edited:
Created feature-copy-name
branch: Add clipboard: <clipboard tool>
to config.yaml
and you can copy item name to that clipboard by pressing Ctrl + c
.
Tested on wl-copy
for now.
clipboard is diverse. on server, i have to use osc52 to copy file name, full path, or parent path. it's implemented as a plugin for nnn, in several lines of bash. So a plugin system can be a solver to the diverse world. For simplicity, i use osc52 to copy in desktop too.
If we could use reg in commandline, which can be seen as a builtin clipboard. it also works on server.
In feature-copy-name
branch I implemented to spawn a new process that calls the application e.g. wl-copy, which user can define in config file, and pass the item name to it to copy to clipboard. This of course does not work if they do not have such a tool, and your case falls into this category, right?
I'm unsure whether it'd be good to implement plugin to felix 🤔
Also, let me make things clear: what do you mean exactly by reg
? regex?
Or, :reg
in Vim? It actually is implemented but in felix it means item itself: by e.g. "ayy
item is yanked to register a, and can be put by "ap
.
If it's ok that we have just a builtin-register (in this case, of item name) and it disappears after exit, it'd be easy to work with... Just wondering which key binding would be best ;)
sorry. i always mean register. (o )ノ
vim use ctrl-r to use register in its commandline
Cool. I'll give it a try!
5f09a71e273269b9e83370b43ce0578a31597884
feature-copy-name
now allows Ctrl + r
in command line (called shell mode in this app). Currently only items in register zero are converted into its name and put into the line.
Test like this: yy:<C-r>
.
Todo: Allow to use other registers as well
Released by v2.6.0 Thank you again!
tried. awesome!
:zip -r folder_name.zip folder_name
. the bad part is typefolder_name
manually, even twice.