Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imgcat has problems with tmux #11

Closed
gamefiend opened this issue Aug 31, 2017 · 3 comments
Closed

imgcat has problems with tmux #11

gamefiend opened this issue Aug 31, 2017 · 3 comments

Comments

@gamefiend
Copy link
Contributor

Hi! imgcat is really cool. The only snag I found is that it doesn't work from within tmux. Looking around I saw that the iterm2 folks deal with this in their bash script version:

# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux;
# <sequence> ST, and for all ESCs in <sequence> to be replaced with ESC ESC. It
# only accepts ESC backslash for ST.
function print_osc() {
    if [[ $TERM == screen* ]] ; then
        printf "\033Ptmux;\033\033]"
    else
        printf "\033]"
    fi
}

# More of the tmux workaround described above.
function print_st() {
    if [[ $TERM == screen* ]] ; then
        printf "\a\033\\"
    else
        printf "\a"
    fi
}

I'd be happy to submit a PR to make this change if it seems OK to you!

@campoy
Copy link
Owner

campoy commented Aug 31, 2017

happy to get a PR yeah! seems like the fix should be quite easy too

@gamefiend
Copy link
Contributor Author

👍 sweet! working on it now!

@gamefiend gamefiend mentioned this issue Sep 1, 2017
@campoy
Copy link
Owner

campoy commented Jul 16, 2019

PR merged! And only took me 2 years to notice

So sorry!

@campoy campoy closed this as completed Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants