Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is no
ss
natively on FreeBSD, but there issockstat
. This was making yank.sh fail. I have added another elif clause and a check for ss and sockstat presence, as yank.sh was failing. Also the usual replacement of #!/bin/bash with #!/usr/bin/env bash. Bear in mind that I use OSC52, and not xclip etc, as I do not use X11, only text mode, on remote servers. I have tested that elif clause using a different port to make sure it works, but I have not tested it with xclip. Mygrep -q
test simply checks if there is a listening port, I am not sure if you need to test for anything more—I see you are using a more complex expression than mine with| tail -n +2 | wc -l
, but I do not know why, as I cannot see what those two lines would contain.Feel free to combine lines 26-29—I did not want to change your code too much.
Many thanks for creating your yank.sh script.
PS. I would keep this pending till tmux-online-status PR has merged.