-
-
Notifications
You must be signed in to change notification settings - Fork 651
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
feat: add args to new-tab action #2072
Conversation
@jaeheonji - this looks great! Only issue I found is that |
@imsnif Thank you for reviewing! I missed that point, I think it would be good to add it. For example, if only name is set, it will only change the tab name of the default layout. I'll update that point and add test cases. |
I updated that issue. but, it still have a issue about But, In this process, the Becuase, So,
Then, coming back to this issue, It looks good that it doesn't show any errors. at least for now. And while writing e2e tests, I found one issue. |
As a user, I would expect to be able to provide any of these options independently and have them default to whatever No LayoutNo layout? Current behavior is the layout this instance of zellij was initially run with. No cwdNo cwd? Current directory. No nameNo name? Name is Tab #. |
@zolrath Thank you for your comments.
To solve this problem, I parsed config first before parsing KDL of keybinds, and modified the code so that config options can be used in keybinds. So, it now works exactly as intended for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jaeheonji - great work on this!
I added some comments that (I think) address your concerns. Let me know what you think.
...ils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments.snap
Outdated
Show resolved
Hide resolved
@jaeheonji - I'm about to merge a pretty big PR today/tomorrow that will cause lots and lots of conflicts here. I don't know what the status here is, but if you're able to merge this before - it will save a lot of work :) |
@imsnif Thanks for letting me know! I'll be updating it today. then if you think my update needs more fixing, I'm fine with putting off this PR for a later time. |
I trust your judgement, @jaeheonji ! If you think it's good, please merge. |
* fix(themes): missing tokyo-night-dark theme * feat: add args to new-tab action * fix: name can be set without layout * feat: pass config options to action parser * chore: remove unnecessary default values * chore: update snapshots * fix(status-bar): add exception for NewTab * fix: update code review * feat: add shallow_eq for action
fix #1967
I added args to NewTab action in keybind.
This can be used like this:
It can assign various layouts to key combinations.