remote fish shell initialization issues

Open
#2,454 18 comments 18 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
bash, fish, zsh
Domain
cli

Research direction

Reproduce the failure with ssh nuc.jacobsdomain.arpa and compare it with the reported ssh nuc.jacobsdomain.arpa fish workaround. Trace the SSH remote-shell initialization that emits _user=... and the bash/zsh setup, then verify that a remote fish session bootstraps without fish syntax errors or closing the connection.

Written by the indexing model from the issue text.

Description

area:ssh bug ready-to-implement SSH triaged
Discord username (optional)

No response

Local Shell and Version

5.8.1

Remote Shell and Version

3.3.1 (fish)

Operating System and Version

macOS 12

Warp Version

v0.2023.01.03.08.03.stable_01

I have tried commenting out my system & user rcfiles and warp still will not bootstrap
  • Yes
Screenshots

Similar to https://github.com/warpdotdev/Warp/issues/2201; fish attempts to send bash/zsh shell initializations, causing fish to error, preventing login.

ssh nuc.jacobsdomain.arpa
fish: Unsupported use of '='. In fish, please use 'set _user "$(whoami 2>/dev/null || echo $USER)"'.

Connection to nuc.jacobsdomain.arpa closed.
ssh nuc.jacobsdomain.arpa -vvvv
OpenSSH_9.0p1, LibreSSL 3.3.6
[...]
debug3: Ignored env NVM_DIR
debug3: Ignored env NVM_CD_FLAGS
debug3: Ignored env NVM_BIN
debug3: Ignored env NVM_INC
debug3: Ignored env PNPM_HOME
debug3: Ignored env CONDA_CHANGEPS1
debug3: Ignored env WARP_PS1
debug3: Ignored env _
debug1: Sending command:
                         export TERM_PROGRAM='WarpTerminal'

                                                           _user="$(whoami 2>/dev/null || echo $USER)"
                                                                                                      _hostname="$(hostname 2>/dev/null || uname -n)"
                                                                                                                                                     hook=$(printf "{\\"hook\\": \\"SSH\\", \\"value\\": {\\"socket_path\\": \\"~/.ssh/16730788505631\\", \\"user\\": \\"%s\\", \\"machine\\": \\"%s\\", \\"remote_shell\\": \\"%s\\"}}" "$_user" "$_hostname" "${SHELL##*/}" | command od -An -v -tx1 | command tr -d " \\n")
                                                                            printf '\033P$d%s\234' $hook

                                                                                                        if test "${SHELL##*/}" != "bash" -a "${SHELL##*/}" != "zsh"; then
                                                                                                                                                                           exec $SHELL
             fi

               case ${SHELL##*/} in
                                     bash) exec -a bash bash --rcfile <(echo 'set -o vi; set +o vi; HISTCONTROL=ignorespace; printf '\\''\033P$d7b22686f6f6b223a2022496e69745368656c6c222c202276616c7565223a207b227368656c6c223a202262617368227d7d\234'\\''')
                                                                                           ;;
                                                                                               zsh) WARP_TMP_DIR=$(mktemp -d warptmp.XXXXXX)
                                                                                                                                            local ZSH_ENV_SCRIPT='756e7365746f7074205a4c453b20756e736574205243533b20756e73657420474c4f42414c5f5243533b207072696e746620275c7831
[...]
fish: Unsupported use of '='. In fish, please use 'set _user "$(whoami 2>/dev/null || echo $USER)"'.
[...]
Connection to nuc.jacobsdomain.arpa closed.
Transferred: sent 5200, received 4720 bytes, in 0.3 seconds
Bytes per second: sent 16654.9, received 15117.5
debug1: Exit status 123

Can be worked around, ironically, by ssh nuc.jacobsdomain.arpa fish.

Include shell xtrace output
WARP_DEBUG_MODE=1 ssh nuc.jacobsdomain.arpa
fish: Unsupported use of '='. In fish, please use 'set _user "$(whoami 2>/dev/null || echo $USER)"'.

Connection to nuc.jacobsdomain.arpa closed.
Does this block you from using Warp daily?

No

Warp Internal (ignore) - linear-label:e7dfaa84-5fdb-4a00-b754-d8912da923fa

None

Warp Internal (ignore): linear-label:b8107fdf-ba31-488d-b103-d271c89cac3e

None

Dominant language
Rust
Stars
65.1k
Forks
5.6k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from warpdotdev/warp

All issues in warpdotdev/warp

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.