itermocil icon indicating copy to clipboard operation
itermocil copied to clipboard

Setting tab name with echo

Open robertmarkbram opened this issue 5 months ago • 1 comments

I am trying to run a command to set a tab/pane name (not sure which is which atm) using echo.

windows:
  - name: Run-apps
    root: ~
    layout: tiled
    panes:
      - commands:
        - echo -e '\033];My tab name\007'
        - cd ~/my-app

When I run this I get:

200:201: syntax error: Expected “"” but found unknown token. (-2741)

Any way to make this work as I expect?

Rob :)

robertmarkbram avatar Mar 11 '24 03:03 robertmarkbram

Solved this with a script.

      - commands:
        - renameConsole.sh "New name"

The script is hacky because I noticed that sometimes the rename just doesn't work (some timing issue I guess).. but like all good IT solutions clicking the button over and over solves everything:

#!/bin/bash

sleep 2
echo -e "\033];${1}\007"

sleep 2
echo -e "\033];${1} 2\007"

robertmarkbram avatar Mar 12 '24 00:03 robertmarkbram