Skip to content

Fish shell compatibility: Execute temp scripts with bash explicitly instead of relying on default shell #763

@c-0ne

Description

@c-0ne

Description:

When connecting to a system where Fish is the default shell, XPipe fails to establish connections because it generates Bash-syntax temporary scripts (e.g., /tmp/xpipe-XXXXXXXXX.fish) but executes them using the user's default shell.

Current Behavior:

XPipe creates temporary scripts with Bash syntax like:

DELIMITER="-------------------------------------"

These scripts are then executed with the default shell. When Fish is the default shell, this results in syntax errors:

/tmp/xpipe-1246145206.fish (line 2): Unsupported use of '='. In fish, please use 'set DELIMITER "-------------------------------------"'.
DELIMITER="-------------------------------------"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

Expected Behavior:
XPipe should execute its temporary scripts using Bash explicitly, regardless of the user's default shell, using one of these approaches:

  • Add a shebang line: #!/bin/bash at the top of generated scripts
  • Execute scripts explicitly with bash: bash /tmp/xpipe-XXXXXXXXX.fish
  • Detect the default shell and generate shell-specific syntax accordingly

Why This Matters:

  • Users should be able to keep Fish (or any other non-POSIX shell) as their default shell while still using XPipe. The temporary scripts are internal to XPipe's operation and should not depend on the user's shell preference.

Environment:

  • Default shell on target system: Fish
  • XPipe version: 20.3

Proposed Solution:
Since XPipe's temporary scripts use Bash syntax, they should be executed with Bash explicitly rather than assuming the default shell is POSIX-compatible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions