Commit graph

50 commits

Author SHA1 Message Date
Oliver Ruben Albertini 1b1a436e19
copy_pane_pwd: set tmux buffer
All the other copy commands not only set the system clipboard, but also
set the tmux buffer to have the selection. For consistency, the copy
pane PWD action should behave the same way.
2020-10-02 08:21:24 +02:00
Jonas Wendorf 0780e4dd95 Remove 'next-' string from version, fixes #140 2020-04-24 21:09:43 +02:00
lilalkor 3db48fd468 scripts/helpers.sh: fix version compare 2019-11-28 20:31:07 +03:00
Niklas Baumstark 226587cf7c Fix for WSL 2 clip.exe
Apparently clip.exe doesn't work properly with WSL 2: It doesn't exit when EOF is reached on STDIN. This is a workaround by making sure that SIGPIPE is sent on EOF.
2019-07-16 21:16:28 -04:00
Andreas Brenk c32337c164 Support wl-copy from the Wayland clipboard utilities 2019-07-12 10:02:02 -04:00
Christian Höltje 63d505465f test(lint): disable bogus lint alerts 2019-05-01 22:19:53 -04:00
Christian Höltje 30bfd78006 Merge yank-with-mouse from @keidax
- Ran `shfmt` on shell code.
- Fixed ordering of `xclip` and `xsel`.

Issue #109
2018-12-04 10:34:25 -05:00
Christian Höltje c6a73eba6b run shfmt on scripts
shfmt -f . | xargs -E'\n' shfmt -w -i 4 -s
2018-08-22 10:48:18 -04:00
Christian Höltje 302a61e5d4 tmux_is_at_least: fix IFS issue and improve variable names 2018-08-22 10:24:08 -04:00
Christian Höltje 6017d69dc4 tmux_is_at_least: fixed lint 2018-08-14 09:13:09 -04:00
Christian Höltje e401bb6413 Prefer xsel to xclip
Fixes #114
2018-08-14 09:08:06 -04:00
Gabriel Holodak cba7f2c04f PR feedback: add default local value 2018-06-07 21:58:00 -04:00
Gabriel Holodak 8464dad600 Add option to disable mouse bindings 2018-05-28 14:58:32 -04:00
Gabriel Holodak d3a87359ab Add mouse bindings and separate selection option 2018-05-28 14:55:29 -04:00
Robert Przybylowicz ab918db34a Removed MouseDragEnd1Pane and reverted yank deafult action to copy-pipe-and-cancel 2018-01-12 20:32:42 +01:00
Robert Przybylowicz 8e99f32479 yank action + MouseDragEnd1Pane yank 2017-07-05 21:03:26 +02:00
Christian Höltje feb9611b7d Add @override_copy_command to force copy command.
Fixes #90
2017-06-07 00:48:32 -04:00
Christian Höltje 14f588edbe Merge branch 'master' into make-tmux-is-at-least-support-build-from-master 2017-05-19 21:30:19 -04:00
Christian Höltje 1c50f31c93 utils: fix indentation 2017-05-19 21:24:40 -04:00
Maxim Baz b32f951c27 Make tmux_is_at_least support master version 2017-05-16 20:49:57 +02:00
Edgar HIPP a8f20b314f Fix copyline for tmux 2.4
With the current implementation, if your shell is :

$ echo 'foo'

your cursor is at the end of the line, it will copy `$ echo 'foo'` on
tmux 2.4, and `echo 'foo'` on tmux 2.3 and below.

This normalizes the behavior on both versions so that only `echo 'foo'`
is copied
2017-05-09 08:28:56 +02:00
Christian Höltje 3219c86ed2 helpers: shellcheck lint 2017-05-05 23:28:23 -04:00
Christian Höltje 0db3e88f33 rename tmux-is-at-least with _ 2017-05-05 22:34:40 -04:00
Christian Höltje e012849621 copy_line: simpler code for tmux 2.4 2017-05-05 22:32:53 -04:00
Christian Höltje 075f56e365 more lint 2017-05-05 22:16:07 -04:00
Christian Höltje ab9218c987 helpers: more lint 2017-05-05 21:40:52 -04:00
Christian Höltje 6396642871 lint: Declare and assign separately
…to avoid masking return values
2017-05-05 00:29:59 -04:00
Christian Höltje f30926f150 normalized indentation in all scripts 2017-05-05 00:25:22 -04:00
Christian Höltje bd8c664085 Merge pull request #79 from lukewang1024/feature/WSL-support
Use clip.exe if exists for copying to Windows clipboard in WSL.
2017-05-04 11:44:15 -04:00
Edgar HIPP adda216aa0 Support tmux 2.4 for copy_line 2017-04-29 17:05:43 +02:00
Christian Höltje 896ecf9074 Added tmux-is-at-least method for version checking 2017-04-21 15:15:34 -04:00
Luke Wang fe10415ba0 Use clip.exe if exists for copying to Windows clipboard in WSL. 2017-03-28 19:52:51 +08:00
Bruno Sutic dc9853942b
Better use of constants 2015-10-12 14:25:54 +02:00
Bruno Sutic 047e71f9fb
Copy pane current dir feature 2015-10-12 13:54:27 +02:00
HIPP Edgar (PRESTA EXT) a21e5a027c Add support for custom copy command 2015-09-22 09:20:57 +02:00
Xavier Naveira 61f5da39e9 Changed vi mode commands for beginning and end of line by Bruno's suggestion 2015-06-17 10:42:33 +02:00
Xavier Naveira 4d521c1363 Added shell vi mode compatibility 2015-06-17 10:04:02 +02:00
Bruno Sutic 04ce0b9451 Merge pull request #26 from ctjhoa/master
Add xsel support
2015-01-29 16:30:07 +01:00
Bruno Sutic 0d212c2c3d
Change "put selection" key binding to Y
Previously this was `Ctrl-y` but that overrode the default vi-copy mode
key binding.

Closes #27
2014-12-06 23:40:37 +01:00
Camille TJHOA fbca231be2 Add xsel support 2014-11-21 14:30:07 +01:00
Shawn Siefkas 0b323a16df Adding @yank_selection option to override xclip selection
Closes #18
2014-08-04 22:28:50 +02:00
Bruno Sutic ea13a18a5d Bugfix: copy line binding never yanks newlines
This addresses a tmux/bash issue that occurs for commands with multiple
lines. When 'C-e' is pressed in a command, this confuses tmux so
newlines are yanked in copy-mode.

When a user wants to line-yank multiple-line command he is better off
when newlines aren't yanked.
This commit reliably enables this.

Fixes #13
2014-06-29 14:13:27 +02:00
Bruno Sutic 2fa5010bf4 Code cleanup
Removed lines weren't really used.
2014-06-29 12:18:23 +02:00
Bruno Sutic bed68528d9 Bugfix: line yank doesn't work when in last pane line
When the current command line is the last/bottom line in the scrollback
buffer, then jumping to the bottom of the buffer:
- stays in the current line
- goes to the start of current line

This is, of course, not desired bc we get the wrong result.

The fix is to just 'down' movement in copy mode. The down movement
preserves cursor column.

Fixes #11.
2014-06-28 00:50:35 +02:00
Bruno Sutic 8a0c06e1fe Adds wait time for 'yank line' when running remote shell
If 'yank line' is tried when running in a remote shell (ssh) with
latency, the result will not be good.
I consistently yanked only the *last character* in the command.
This is due to latency: yank line feature works faster than the cursor
is moved in the remote shell.

To fix this issue, if remote shell is detected (ssh or mosh) wait time
is added to compensate for network latency.
Wait time of '0.2s' seemed to give good results, but at the end, wait of
'0.4s' is set. This should be more robust and allow for even greater
latency (I only wonder how could anyone work with that).
2014-06-27 12:42:33 +02:00
Bruno Sutic 7cbde7b5dd Line copy feature now works accross multiple lines 2014-06-25 15:35:48 +02:00
Bruno Sutic 22c55eaeda Make sure the line copy feature works with vi and emacs copy mode 2014-06-25 15:16:05 +02:00
Bruno Sutic 4a15a81783 Add a feature for copying current command line to clipboard 2014-06-25 15:11:27 +02:00
Bruno Sutic 94bc2628a8 Extract key-related functions to a helper 2014-06-25 13:33:23 +02:00
Bruno Sutic f0b0dc9d8e Add error handling 2014-06-24 14:40:50 +02:00