0

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:

  1. Only specific to ConEmu: Specifying word separator for double-click selection in ConEmu?
  2. https://github.com/Maximus5/ConEmu/issues/328
  3. https://github.com/Maximus5/ConEmu/issues/1145
  4. List item
5
  • I'm afraid I don't understand the question. Where do you want to double-click in msys2 shell? Isn't a TAB key do what you want?
    – tukan
    Commented Oct 2, 2018 at 7:10
  • @tukan - Please see edited question and let me know if it is clear now. Commented Oct 2, 2018 at 7:27
  • Yes, much better now. The current delimiter for double click is space or / (when it is last) in my msys2 shell. Out of curiosity I tried your 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 the options/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 option copy as rich text.
    – tukan
    Commented Oct 2, 2018 at 7:40
  • @tukan - I was not aware of this setting, but it did not help. As for the asterisk, I see the same as you, and I edited the OP to be specific about this. Commented Oct 2, 2018 at 8:00
  • I see. Well, you have to play around with the settings, I think that is the only option you have.
    – tukan
    Commented Oct 2, 2018 at 8:01

0

You must log in to answer this question.

Browse other questions tagged .