-
Notifications
You must be signed in to change notification settings - Fork 225
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 support for multiple workspaces #169
base: master
Are you sure you want to change the base?
Conversation
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.
👍
I just installed this it's fantastic! Thank you! Thank you for your hard work this is a fantastic addition! A keymap to change workspaces is a logical extension, I might take a crack at that. I wrapped mine is a zsh script to prompt for the workspace: function slack-term() {
if [[ $# -lt 1 ]]; then
read "workspace?Which workspace: (`jq -r '.workspaces | keys | @csv' $HOME/.slack-term | sed 's/"//g' | sed 's/,/\|/g'`) ? "
else
workspace=${1}
fi
command slack-term -workspace $workspace
} Ex: |
@alexameen roger that! I'll try to get a fix for this in shortly. @erroneousboat would you be interested in a slack-term |
At the moment I don't see the advantage of this, instead of using multiple configuration files. Only that you have one config file. |
@erroneousboat The advantage is that you can share settings across workspaces instead of needing to edit each file independently. But happy to leave this as a fork and close the PR if you prefer! |
@erroneousboat Do you still believe that copy-pasting configs between workspaces, and having to edit them in five places every time you need to change something is a good idea? |
This adds (backwards-semi-incompatible) support for multi-workspace:
Set up a new
workspaces
lookup in your config:Then invoke with:
All options (except for
workspaces
itself) can also be specified in each workspace config, except foremoji
which I'm not sure how to check for in this implementation. (Thoughts welcome!)If you do not specify a
-workspace
flag, the first one (alphabetically) will be selected. This is nice for invoking in cases where users have only a single workspace, and is a sane default otherwise.See #46 for earlier discussion.