Skip to content

Bash terminal integration setup fails with a syntax error #6142

@dradtke

Description

@dradtke

The terminal integration setup in Bash fails with a syntax error.


To Reproduce

$ echo $SHELL
/bin/bash

$ eval "$(goose term init bash)"
bash: syntax error near unexpected token `{{'

$ goose term init bash
export GOOSE_SESSION_ID="20251216_10"
alias @goose='/home/dradtke/.local/share/mise/installs/ubi-block-goose/1.16.1/goose term run'
alias @g='/home/dradtke/.local/share/mise/installs/ubi-block-goose/1.16.1/goose term run'

goose_preexec() {{
    [[ "$1" =~ ^goose\ term ]] && return
    [[ "$1" =~ ^(@goose|@g)($|[[:space:]]) ]] && return
    ('/home/dradtke/.local/share/mise/installs/ubi-block-goose/1.16.1/goose' term log "$1" &) 2>/dev/null
}}

if [[ -z "$goose_preexec_installed" ]]; then
    goose_preexec_installed=1
    trap 'goose_preexec "$BASH_COMMAND"' DEBUG
fi

Expected behavior

Goose's terminal integration should work without hitting a syntax error.


Screenshots

N/A


Please provide the following information

  • OS & Arch: Ubuntu 22.04 x86
  • Interface: CLI
  • Version: 1.16.1
  • Extensions enabled: None
  • Provider & Model: Azure OpenAI gpt-4o

Additional context

None I think

Metadata

Metadata

Assignees

Labels

clip2Priority 2 - Medium

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions