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

Problem with colon (:) in pane commands in yaml-session-files #820

Open
abelbabel opened this issue Sep 19, 2022 · 1 comment
Open

Problem with colon (:) in pane commands in yaml-session-files #820

abelbabel opened this issue Sep 19, 2022 · 1 comment

Comments

@abelbabel
Copy link

Hi,

there seems to be a problem with colons in pane commands. See the following example yaml-session-file. Escaping with backslash (\) has no effect. Using single ticks (') instead of double ticks (") has no effect.
I'm using tmuxp 1.9.3 on Ubuntu 18.04, installed via pip.

session_name: buggy_session
windows:
  - window_name: bug_window
    panes:
      # the following works
      - echo "a bug with colon:"
      # the following gives no output
      - echo "a bug with colon: a"
      # the following results in no start of session and in error: yaml.scanner.ScannerError: while scanning a quoted scalar
      #- echo "a bug with colon: "

Maybe I missed a documentation somewhere, which says how to deal with colons in commands. Otherwise (if I did not and if it is not really a bug) a documentation would be great.

Kind regards,
abelbabel

@zappolowski
Copy link
Contributor

This is due how the file is parsed.

- echo "a bug with colon: a"

is considered a dictionary with key echo "a bug with colon" and value a". If you need to enforce parsing it as string, you have to enclose the full line in single quotes:

- 'echo "a bug with colon: a"'

PS: Also take note of the different highlighting of this message.

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

2 participants