* feat: add capability to dispatch actions from cli
Add capability to dispatch actions from the cli.
Can be invoked through `zellij action [actions]`
Automatically sends the action either to the current session,
or if there is only one session to the single session.
If there are multiple sessions, and no session is specified it will
error out.
Example:
1.
```
zellij action "[NewTab: , NewTab: ]"
```
2.
```
zellij -s fluffy-cat action '[NewPane: , WriteChars: "echo Purrr\n" ]'
```
3.
```
zellij -s fluffy-cat action '[ CloseTab, ]
```
* add: error message on malformed input
Add an error message on malformed input, for the `action`'s dispatch.
Rather than resulting in a panic.
* add: function to query the client id
* add: send specific actions to certain clients
Adds ability to send actions, that don't impact the server state
to all connected clients. For example `MoveFocus`
* add: client_id to non blocking actions
* chore(fmt): `cargo fmt`
* add: pick correct session, if there is exactly one
* add: use correct `client_id` for detach action
* add: make `[ ]` opaque to the user
* add: miette to toplevel to improve error message
* add: fake client reading configuration
Add the fake client reading configuration files,
this allows actions, that rely on configuration work
correctly. This is an intermediate solution, and should ideally not
be needed. It would be better if most of this state would be handled
by the server itself.
* chore(fmt): rustmt
* add: ability to detach multiple clients
Add ability to detach multiple clients at the same time.
* remove: obsolete functionality
* remove: unused functionality
* add: send correct action upon exiting
* chore(update): cargo update
* Updated names and dialoguer crates dependencies
I tried to build and run zellij with the updated dependencies and they seem to show no issues.
I need this in order to package zellij for Fedora.
* Updated cargo.lock
* fix: use suggested option for `names` crate
https://github.com/fnichol/names/blob/main/CHANGELOG.md#0120---2021-09-12
Co-authored-by: a-kenji <aks.kenji@protonmail.com>
* build: strip debug symbols
Stripping the symbols for the release build drops binary size
currently by 20% and the plugin binaries by up to 50%.
Alternative: Keep the debug symbols also on releases
* bump(rust): `1.58.0` -> `1.59.0`
* chore: bump MSRV `1.56` -> `1.59`
Needed for cargos strip-debug feature
* fix(feat): `disable_automatic_asset_installation`
This fixes a regression in the feature system:
The asset installation didn't get turned off by the feature.
Add error logging to the install functions.
Properly show features in setup
disable `mkdir` in `wasm_vm` on `feature-disable-asset-installation`
Alternative:
Is this even needed? We make sure the directory is there upon the
normal asset installation.
fixes#1130
Remove unnecessary to_string
Replace `garando_syntax` crate with `lev_distance` which is much smaller
Replace `lev_distance` crate with `suggestion` to simplify the code
* fix(main): Remove unnecessary pub visibility from the main function in `src/main.rs`
* fix(main): Avoid unnecessary if-evaluations in the main function of `src/main.rs`
* fix(commands): Simplify kill_all_sessions
feat(attach): Support `--first` option for `attach` sub-command to let zellij choose the alphabetically first session; resolve#823
fix(attach-first): Fix `--first` option to choose the first created session in the existent sessions
feat(attach): Support `--index` option to choose the session indexed by provided number like -t option of tmux
feat(attach): Support listing active sessions with index when a provided number is not found in the active sessions
feat(attach): Support listing active sessions with index when a provided number is not found in the active sessions
feat: Add anyhow to uniformly treat error types and avoid panics