And a DBus method to get the primary selection

Bug #1553587 reported by Stephen Boddy
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Terminator
New
Wishlist
Unassigned

Bug Description

Original request in a Launchpad Question: "I want to create a custom command to open a file (it is selected the path/name of file in Terminator) with an editor. Is there any keyword to represent the selected text?"

My (maintainer) best way to do this would be to add a DBus call that can be used with remotinator that would get the highlighted text. An bash alias can be used to get the selection, so:
alias tps="remotinator get_primary_selection"

and calling the following would work:
vi $(tps)

For example if a large file was selected. (Personally I would always use Select and middle click, so I'm not sure what exactly this helps with.)

Changed in terminator:
importance: Undecided → Wishlist
Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

Just wondering, how is it any simpler than entering

vi <shift-insert>

?

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

Also this might be problematic if the current working directory changed in between. iTerm2 has a nice shell integration where the emulator does have the concept of the working directory (and remembers it line-by-line) and a Cmd-click or something similar can be used to open the file in the correct directory. We're yet to see if we'll do anything similar in Vte.

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

Furthermore:

xclip -o

Revision history for this message
Juan Simón (simonbcn) wrote :

xclip works only in local, if I have a opened remote ssh session in Terminator, xclip doesn't work.

Revision history for this message
Juan Simón (simonbcn) wrote :

The custom commands have a poor utility if I can't interact with actual session. For example, I want to search in Google an error displayed in console.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.