Migration of zuliprc location to a config directory
What does this PR do, and why?
Adds the following features:
-
Support recognizing zuliprc from multiple select locations.
~/zuliprc- the user's downloads directory
- the user's config directory
-
Move zuliprc creation into user's config directory. The new path would look like
.config/zulip-terminal/zuliprc. -
Create realm-wise zuliprc files in the configuration directory. Each realm gets its own directory. The new directory structure would look like:
<user's config directory>/zulip-terminal/
org1-name/zuliprc
org2-name/zuliprc
zuliprc
-
Add new positional argument - prefix of realm name to get its configuration. New command examples:
zulip-term zulizulip-term "full organization name" -
Add -o argument to list realms with stored zuliprc.
$zulip-term -o
The following organizations are available:
Zulip Community
Another Organization
- Add -n argument to login to a realm, and create config.
$zulip-term -n
Please enter your credentials to login into your Zulip organization.
What does this PR do, and why? (expired)
What does this PR do, and why?
Moves config location to 'XDG_CONFIG/zulip/'. Makes zuliprc files dot files - .zuliprc. Use independent org.zuliprc files for each organization.
Does not yet separate the zterm config from the api config. Does not yet update the documents (README.md, FAQ.md, etc). New tests not added.
The code is not yet meant for review. This is only a draft to play around with the configuration in order to finalize what behavior is desired.
External discussion & connections
- [x] Discussed in #zulip-terminal in
Moving config - [ ] Fully fixes #
- [x] Partially fixes issue #678
- [ ] Builds upon previous unmerged work in PR #
- [ ] Is a follow-up to work in PR #
- [ ] Requires merge of PR #
- [ ] Merge will enable work on #
How did you test this?
- [x] Manually - Behavioral changes
- [ ] Manually - Visual changes
- [x] Adapting existing automated tests
- [ ] Adding automated tests for new behavior (or missing tests)
- [ ] Existing automated tests should already cover this (only a refactor of tested code)
Self-review checklist for each commit
- [x] It is a minimal coherent idea
- [x] It has a commit summary following the documented style (title & body)
- [x] It has a commit summary describing the motivation and reasoning for the change
- [x] It individually passes linting and tests
- [ ] It contains test additions for any new behavior
- [x] It flows clearly from a previous branch commit, and/or prepares for the next commit
Thanks for updating this, @Niloth-p! I'll leave it for the mentor and maintainers to review. I'm removing the buddy review label now.