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

Improve action new-tab #3196

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Improve action new-tab #3196

wants to merge 5 commits into from

Conversation

abatkin
Copy link

@abatkin abatkin commented Mar 12, 2024

Improvements to zellij action new-tab:

  • setting --cwd <dir> no longer requires specifying a layout
  • add --run <command> (and --args <arg>) to run a command
  • add --edit <filename> to launch editor of the specified file

A few other cleanups along the way:

  • Update .gitignore to add .idea project files (JetBrains tools like CLion/RustRover)
  • Update .gitignore to add docker-compose.override.yml (for example to set additional SELinux settings when running tests)
  • Quote "true" in docker-compose.yml since otherwise it could be treated as a boolean and rejected

Fixes #2981

@abatkin
Copy link
Author

abatkin commented Mar 12, 2024

A few questions:

  1. Should an entry be added to CHANGELOG.md?
  2. Should the .wasm files be checked in? I'm guessing no, so I can pull those back out (otherwise there will be conflicts everywhere, right?)
  3. A few .snap files had to be updated, since it was necessary to change the NewTab interface, is that okay? I don't see another way around changing that, but I hope that doesn't break anything else that I haven't thought about
  4. TerminalAction gets directly serialized now, and I'm not sure if that's appropriate, or if there should be an intermediate representation (that will be otherwise identical, at least for now) for the client-server datamodel

@devyntk
Copy link

devyntk commented Sep 3, 2024

Bumping this issue - currently this is blocking me from implementing some extremely useful scripting that I use all the time in tmux. The ability to create a new tab with a specified command in it seems like an extremely basic and necessary feature for any amount of scripting in Zellij, and is a major detriment to adoption of Zellij in my team.

* Can now spawn new tab in specified directory without needing to
  specify layout
* Options to specify initial run command (plus args) or file to edit
  into the new tab
@abatkin
Copy link
Author

abatkin commented Sep 6, 2024

A few updates:

  • rebased from main, fixed conflicts
  • removed .wasm files from PR since they will always conflict, presumably whoever handles releases will update those

Tests pass, and I've been playing around and it seems to work properly.

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

Successfully merging this pull request may close these issues.

can't set working directory for new tab w/o layout
2 participants