Skip to content
Open
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
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e
set -u
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Installation
-------------
Prerequisites:
- tmux >= "v2.4"
- OSX, Linux (tested on Ubuntu 14 and CentOS7)
- OSX, Linux (tested on Ubuntu 14 and CentOS7), FreeBSD (tested on 11.1)

Personally, I use it on OSX 10.11.5 El Capitan through iTerm2.

Expand Down
7 changes: 5 additions & 2 deletions tmux/yank.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -eu

Expand All @@ -22,7 +22,10 @@ elif [ -n "${DISPLAY-}" ] && is_app_installed xsel; then
copy_backend="xsel -i --clipboard"
elif [ -n "${DISPLAY-}" ] && is_app_installed xclip; then
copy_backend="xclip -i -f -selection primary | xclip -i -selection clipboard"
elif [ -n "${copy_backend_remote_tunnel_port-}" ] && [ "$(ss -n -4 state listening "( sport = $copy_backend_remote_tunnel_port )" | tail -n +2 | wc -l)" -eq 1 ]; then
# Check if ss installed, as there is no native ss on FreeBSD (use sockstat instead)
elif [ -n "${copy_backend_remote_tunnel_port-}" ] && is_app_installed ss && [ "$(ss -n -4 state listening "( sport = $copy_backend_remote_tunnel_port )" | tail -n +2 | wc -l)" -eq 1 ]; then
copy_backend="nc localhost $copy_backend_remote_tunnel_port"
elif [ -n "${copy_backend_remote_tunnel_port-}" ] && is_app_installed sockstat && sockstat -4 -l | grep -q ":$copy_backend_remote_tunnel_port" ; then
copy_backend="nc localhost $copy_backend_remote_tunnel_port"
fi

Expand Down