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

Add on_force_close config option #609

Merged
merged 2 commits into from
Jul 9, 2021
Merged

Add on_force_close config option #609

merged 2 commits into from
Jul 9, 2021

Conversation

kunalmohan
Copy link
Member

This allows the user to configure the behaviour for when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP. User can choose between quit and detach.

@kunalmohan kunalmohan requested a review from a-kenji July 8, 2021 19:15
@kunalmohan
Copy link
Member Author

@a-kenji I was facing some trouble parsing the new option from the config file. But I figured it out and it's working fine now. I just want to make sure I haven't made any unnecessary changes.

Copy link
Contributor

@a-kenji a-kenji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

zellij-utils/assets/config/default.yaml Show resolved Hide resolved
zellij-utils/src/input/options.rs Show resolved Hide resolved
@kunalmohan kunalmohan merged commit 0e6e581 into main Jul 9, 2021
@kunalmohan kunalmohan deleted the force-close branch July 9, 2021 07:20
@kunalmohan
Copy link
Member Author

I think we'll have to add #[serde(alias="quit")]] for reading from yaml. Because the from_str is for reading from command line args I guess. But I'm not sure about this. And I haven't tested it.

@a-kenji
Copy link
Contributor

a-kenji commented Jul 9, 2021

I added the alias now in #612, because I was switching the options a little anyway,
I tested it out and it was needed for proper serialization.

a-kenji added a commit that referenced this pull request Jul 9, 2021
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.

2 participants