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

Error when using Warp (or other terminals) #6

Open
evilmonkey19 opened this issue May 11, 2024 · 0 comments
Open

Error when using Warp (or other terminals) #6

evilmonkey19 opened this issue May 11, 2024 · 0 comments

Comments

@evilmonkey19
Copy link
Contributor

evilmonkey19 commented May 11, 2024

There is a problem related to some terminals like WARP when it connects to it. The main issue seems to be that certain commands are being sent on startup just right after the connection establishment.

The command I am refering to is the following:

                         export TERM_PROGRAM='WarpTerminal'
                                                           hook=$(printf "{\\"hook\\": \\"SSH\\", \\"value\\": {\\"socket_path\\": \\"~/.ssh/171542451212463\\", \\"remote_shell\\": \\"%s\\"}}" "${SHELL##*/}" | command -p od -An -v -tx1 | command -p tr -d " \\n")
                                                                                        printf '\033P$d%s\234' $hook
                                                                                                                    if test "${SHELL##*/}" != "bash" -a "${SHELL##*/}" != "zsh"; then
        if test ! -e $HOME/.hushlogin; then
                                            if test -r /etc/motd; then
                                                                       command -p cat /etc/motd
                                                                                                elif test -r /run/motd; then
                                                                                                                             command -p cat /run/motd
                                                                                                                                                      elif test -r /run/motd.dynamic; then
             command -p cat /run/motd.dynamic
                                              elif test -r /usr/lib/motd; then
                                                                               command -p cat /usr/lib/motd
                                                                                                            elif test -r /usr/lib/motd.dynamic; then
                                                                                                                                                     command -p cat /usr/lib/motd.dynamic
            fi
               fi
                  if test -r /etc/profile; then
                                                . /etc/profile
                                                               fi
                                                                  exec $SHELL
                                                                             fi
                                                                               case ${SHELL##*/} in
                                                                                                    bash)
                                                                                                          exec -a bash bash --rcfile <(echo '
                                                                                                                                              command -p stty raw
                                                                                                                                                                  HISTCONTROL=ignorespace
            HISTIGNORE=" *"
                            WARP_SESSION_ID="$(

These are commands issued in the MacOS version of Warp.

Note: Our software should be aware of such cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant