Any way to make "download file" work inside tmux?

I just enabled the remote directory reporting functionality to get the download functionality working, but it doesn't work when I'm inside tmux which is always. Is there any workaround that I can use or am I just stuck?

Could you please run this command in tmux and see if transfer works after command executed?

source ~/.bashrc_Core_Shell

I did a bit more research and found out that the problem is that tmux is receiving the \7; escape sequence and not passing it through to the terminal. I was able to fix it by wrapping the entire thing within a tmux escape sequence instead. I don't know that it makes sense to update .bashrc_Core_Shell just for this, but if anyone else runs into a similar problem here is the updated printf I used:

printf '\ePtmux;\e\e]7;%s\a\e\\' "file://$HOSTNAME$url_path"
1 Like

Alex, thank you so much for the clue. Since tmux sets $TMUX environment variable, I think we can change the printf line to this:

if [ -n "$TMUX" ]; then
    printf '\ePtmux;\e\e]7;%s\a\e\\' "file://$HOSTNAME$url_path"
else
    printf '\e]7;%s\a' "file://$HOSTNAME$url_path"
fi

Above code works for me, could you please do a test on your host? I would like to push the change if it also works for you.

Just tested it and it works for me as well.

One other suggestion would be to also update the code that gets added to .bash_profile to test for either SSH_AUTH_SOCK or SSH_CONNECTION. When connecting into an already established tmux session you often won't have an SSH_TTY set so .bashrc_Core_Shell will never get sourced.

1 Like

With version 1.6.2, the code that gets added to .bash_profile would test SSH_CONNECTION as well as SSH_TTY. Thanks a lot for the suggestions!