Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,12 @@ binding in copy mode. In `v2.0.0` this key binding was changed to `Y` (shift-y).

#### Cygwin requirements

- `putclip` command<br/>
Get the command by installing `cygutils-extra` package with Cygwin's
`setup*.exe`.
- None!<br />
Now supports cygwin builtin /dev/clipboard.
Support still exists for the following if desired:
- `putclip` command <br />
Get the command by installing `cygutils-extra` package with Cygwin's
`setup*.exe`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe something simpler like:

If you have `putclip` (from the `cygutils-extra` package) then that will be used.

Otherwise it will fall back to using `/dev/clipboard`.


### Notes

Expand Down
6 changes: 4 additions & 2 deletions scripts/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,16 @@ clipboard_copy_command() {
else
echo "pbcopy"
fi
elif command_exists "xclip"; then
elif command_exists "xclip" && [ -n "$DISPLAY" ]; then # only works if $DISPLAY set
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove. PR #58 handles this.

local xclip_selection="$(yank_selection)"
echo "xclip -selection $xclip_selection"
elif command_exists "xsel"; then
elif command_exists "xsel" && [ -n "$DISPLAY" ]; then # also required $DISPLAY
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove. PR #58 handles this.

local xsel_selection="$(yank_selection)"
echo "xsel -i --$xsel_selection"
elif command_exists "putclip"; then # cygwin clipboard command
echo "putclip"
elif [ "$OSTYPE" == "cygwin" ]; then # cygwin fall back to built-in /dev/clipboard
echo "cat > /dev/clipboard"
elif [ -n "$(custom_copy_command)" ]; then
echo "$(custom_copy_command)"
fi
Expand Down