I am using Msys2, from PortableApps (I think this is not relevant), with the terminal launched via two possible cases (referred to below): (1) directly from the PortableApps launcher, (2) ConEmu.
The problem: I want to be able to choose the word delimiter, so I can change what I get copied when I double (left-)click and then middle-click elsewhere to paste (or Ctrl+v if pasting in a Windows application).
Example 1: I set my command prompt as
[myuser@mycomputer:/c/Users/...]$
I want to double-click anywhere in /c/Users/...
and get that path selected for copy-pasting.
As of now, what I get copied is myuser@mycomputer:/c/Users/...
(neither @
or :
are word delimiters for this purpose).
Any of the two cases (i.e., terminals, see above) get it wrong.
Example 2: If my command takes more than one line (given the width of my window) the end-of-line in the screen breaks whatever is copied. If I have (note that the command line is broken due to the window width)
[myuser@mycomputer:/c/Users/...]$ cp -p ~/dir1/my_directory/fil
e_pattern1.dat target_dir
and double-click anywhere in ~/dir1/my_directory/fil
, that is what I get copied.
If I double-click anywhere in e_pattern1.dat
, that is what I get copied as well.
I want to get in both cases ~/dir1/my_directory/file_pattern1.dat
.
Case (1) gets this right, case (2) gets it wrong.
Example 3: If I have
[myuser@mycomputer:/c/Users/...]$ ls -F
myscript* mydir/ myfile.txt
(-F
may append a character to each item, *
stands for executable, e.g.),
I want to double click on myscript
and not get *
included.
Case (1) gets this right, case (2) gets it wrong.
... But I do want to get *
included if it is part of a file pattern.
Both cases (1) and (2) get it wrong (I do not know if any terminal gets this right).
Note: On the positive side, if I execute
[myuser@mycomputer:/c/Users/...]$ cd ~/Documents/
and then I double-click anywhere in Documents
, I get ~/Documents
copied in case (1), and ~/Documents/
in case (2).
Any of the two are ok (even if I would like to choose this too).
Other terminals (e.g., Multi-Tabbed PuTTY) only copy /Documents/
, at least in the default configuration.
How can I do this?
This help page doesn't help.
Related:
TAB
key do what you want?cp -p ~/dir1/my_directory/fil e_pattern1*.dat target_dir
nad it copied the~/dir1/my_directory/file_pattern1
(till the star). Did you play with theoptions/mouse
? (You have to right-click on the titlebar of your msys2 shell and select Opions...) There forth from top is Mouse configuration. Try to uncheck an optioncopy as rich text
.