id stringlengths 20 30 | source stringclasses 1
value | chunk_index int64 0 520k | token_count int32 154 512 | content stringlengths 185 57.5k |
|---|---|---|---|---|
rust_dataset_chunk_520000 | rust_dataset.txt | 520,000 | 512 | * fix(themes): missing tokyo-night-dark theme (https://github.com/zellij-org/zellij/pull/1972)
* refactor(plugins): fix plugin loading data flow (https://github.com/zellij-org/zellij/pull/1995)
* refactor(messaging): reduce extraneous cross-thread messaging (https://github.com/zellij-org/zellij/pull/1996)
* errors: pre... |
rust_dataset_chunk_520001 | rust_dataset.txt | 520,001 | 512 | properly if limited to only 1 line (https://github.com/zellij-org/zellij/pull/1875)
* feat: allow starting command panes suspended (https://github.com/zellij-org/zellij/pull/1887)
* debugging: Remove calls to unwrap in `zellij_server::os_input_output` (https://github.com/zellij-org/zellij/pull/1895)
* fix: remove spac... |
rust_dataset_chunk_520002 | rust_dataset.txt | 520,002 | 512 | ellij/pull/1896)
## [0.32.0] - 2022-10-25
* BREAKING CHANGE: switch config/layout/theme language to KDL (https://github.com/zellij-org/zellij/pull/1759)
* debugging: Improve error handling in screen thread (https://github.com/zellij-org/zellij/pull/1670)
* fix: Server exits when client panics (https://github.com/zell... |
rust_dataset_chunk_520003 | rust_dataset.txt | 520,003 | 512 | /pull/1799)
* debugging: Log `thread_bus` IPC messages only in debug mode (https://github.com/zellij-org/zellij/pull/1800)
* feat: improve zellij run CLI (https://github.com/zellij-org/zellij/pull/1804)
* docs: Add tips for code contributions to CONTRIBUTING (https://github.com/zellij-org/zellij/pull/1805)
* feat: chan... |
rust_dataset_chunk_520004 | rust_dataset.txt | 520,004 | 512 | )
* Terminal compatibility: implement faux scrolling when in alternate screen mode(https://github.com/zellij-org/zellij/pull/1678)
* fix: mouse-click on tab-bar in simplified-ui now always focuses the correct tab (https://github.com/zellij-org/zellij/pull/1658)
* fix: sort UI cursors properly when multiple users are fo... |
rust_dataset_chunk_520005 | rust_dataset.txt | 520,005 | 512 | ellij-org/zellij/pull/1481)
* add: checksum for release binary (https://github.com/zellij-org/zellij/pull/1482)
* fix: update cli tooltips (https://github.com/zellij-org/zellij/pull/1488)
* refactor: deduplicate code in `screen.rs` (https://github.com/zellij-org/zellij/pull/1453)
* chore(dependencies): update `clap`: ... |
rust_dataset_chunk_520006 | rust_dataset.txt | 520,006 | 512 | 1583)
* fix: refactor match session name (https://github.com/zellij-org/zellij/pull/1582)
* fix: print "Session detached" rather than "Bye from Zellij!" when detaching from a session (https://github.com/zellij-org/zellij/pull/1573#issuecomment-1181562138)
* performance: improve terminal responsiveness (https://github.c... |
rust_dataset_chunk_520007 | rust_dataset.txt | 520,007 | 512 | : htop}}}"
```
## [0.30.0] - 2022-06-07
* fix: right and middle clicks creating selection (https://github.com/zellij-org/zellij/pull/1372)
* feat: Attach to sessions more conveniently by only typing their name's first character(s) (https://github.com/zellij-org/zellij/pull/1360)
* fix: a small typo (https://github.c... |
rust_dataset_chunk_520008 | rust_dataset.txt | 520,008 | 512 | the `compact-bar`. (https://github.com/zellij-org/zellij/pull/1450)
* feat: allow searching through and editing the pane scrollback with your default editor (https://github.com/zellij-org/zellij/pull/1456)
* fix: exit client loop on empty message from server (https://github.com/zellij-org/zellij/pull/1454)
* fix: mous... |
rust_dataset_chunk_520009 | rust_dataset.txt | 520,009 | 512 | overflowing the title line (https://github.com/zellij-org/zellij/pull/1361)
* Terminal compatibility: adjust saved cursor position on resize (https://github.com/zellij-org/zellij/pull/1362)
* fix: avoid panic on renaming a floating pane (https://github.com/zellij-org/zellij/pull/1357)
* fix: change the way sessions ar... |
rust_dataset_chunk_520010 | rust_dataset.txt | 520,010 | 512 | `wasm_vm` use `cache_dirs` for ephemeral plugin data (https://github.com/zellij-org/zellij/pull/1230)
* Bump `nix` version to `0.23.1` (https://github.com/zellij-org/zellij/pull/1234)
* Refactor: move tiled_panes to their own module (https://github.com/zellij-org/zellij/pull/1239)
* Add: allow rounded frame corners to... |
rust_dataset_chunk_520011 | rust_dataset.txt | 520,011 | 512 | /1223)
## [0.26.0] - 2022-03-11
* Fix: invalid assignment of `client_id` (https://github.com/zellij-org/zellij/pull/1052)
* Add: action to send `^b` in `tmux-mode` (https://github.com/zellij-org/zellij/pull/1106)
* Add: various action bindings to `tmux-mode` (https://github.com/zellij-org/zellij/pull/1098)
* Terminal ... |
rust_dataset_chunk_520012 | rust_dataset.txt | 520,012 | 512 | 1157)
* Fix: improve layout naming (https://github.com/zellij-org/zellij/pull/1160)
* Add: installation instructions for `Void Linux` (https://github.com/zellij-org/zellij/pull/1165)
* (BREAKING CHANGE) Fix: `list-session` to error and stderr on fail (https://github.com/zellij-org/zellij/pull/1174)
This is a BREAKING... |
rust_dataset_chunk_520013 | rust_dataset.txt | 520,013 | 512 | /pull/1016)
* Fix: scroll page up/down by actual amount of rows (https://github.com/zellij-org/zellij/pull/1025)
* Fix: handle csi erase param 3 (https://github.com/zellij-org/zellij/pull/1026)
* Add: theme example for `tokyo-night` (https://github.com/zellij-org/zellij/pull/1015)
* Fix: log a warning, if a user-config... |
rust_dataset_chunk_520014 | rust_dataset.txt | 520,014 | 512 | clippy runs on all targets (https://github.com/zellij-org/zellij/pull/972)
* Fix: atomically create default assets every time a session starts (https://github.com/zellij-org/zellij/pull/961)
* Fix: Allow multiple users to switch tabs with the mouse (https://github.com/zellij-org/zellij/pull/959)
* Fix: Allow switching... |
rust_dataset_chunk_520015 | rust_dataset.txt | 520,015 | 512 | github.com/zellij-org/zellij/pull/917)
* Fix: update example config options (https://github.com/zellij-org/zellij/pull/920)
* Fix: correct handling of unbinds (https://github.com/zellij-org/zellij/issues/923)
* Fix: improve performance when resizing window with a large scrollback buffer (https://github.com/zellij-org/z... |
rust_dataset_chunk_520016 | rust_dataset.txt | 520,016 | 512 | * Refactor: Support multiple users in `Tab`s (https://github.com/zellij-org/zellij/pull/864)
* Refactor: close_pane returns closed pane (https://github.com/zellij-org/zellij/pull/853)
* Add: ability to configure zellij through layouts (https://github.com/zellij-org/zellij/pull/866)
* Refactor: simplify terminal charact... |
rust_dataset_chunk_520017 | rust_dataset.txt | 520,017 | 512 | ull/768)
* Feature: Rotate Pane location (https://github.com/zellij-org/zellij/pull/802)
* Terminal compatibility: improve handling of wide-characters when inserted mid-line (https://github.com/zellij-org/zellij/pull/806)
* Fix: plugins are now only compiled once and cached on disk (https://github.com/zellij-org/zellij... |
rust_dataset_chunk_520018 | rust_dataset.txt | 520,018 | 512 | ://github.com/zellij-org/zellij/pull/837)
* Add: introduce `thiserrror` to simplify error types (https://github.com/zellij-org/zellij/pull/836)
* Add: support `--index` option for the `attach` subcommand in order to
choose the session indexed by the provided creation date (https://github.com/zellij-org/zellij/pull/82... |
rust_dataset_chunk_520019 | rust_dataset.txt | 520,019 | 512 | ellij/pull/753)
## [0.18.0] - 2021-09-29
* Fix: Properly open new pane with CWD also when switching to a new tab (https://github.com/zellij-org/zellij/pull/729)
* Feature: Option to create a new session if attach fails (`zellij attach --create`) (https://github.com/zellij-org/zellij/pull/731)
* Feature: Added the new ... |
rust_dataset_chunk_520020 | rust_dataset.txt | 520,020 | 512 | )
* Fix bug where wide chars would mess up pane titles (https://github.com/zellij-org/zellij/pull/698)
* Fix various borderless-frame in viewport bugs (https://github.com/zellij-org/zellij/pull/697)
* Fix example configuration file (https://github.com/zellij-org/zellij/pull/693)
* Fix various tab bar responsiveness iss... |
rust_dataset_chunk_520021 | rust_dataset.txt | 520,021 | 512 | `dbg!` support!
* Add displaying of the `session-name` to the `tab-bar` (https://github.com/zellij-org/zellij/pull/608)
* Add command to dump `layouts` to stdout (https://github.com/zellij-org/zellij/pull/623)
* `zellij setup --dump-layout [LAYOUT]` [default, strider, disable-status]
* Add `action`: `ScrollToBottom`... |
rust_dataset_chunk_520022 | rust_dataset.txt | 520,022 | 512 | mode resizes panes by 5% of the space on screen, not some fixed number
* Panes on-screen keep their ratios – a screen split 50/50 between two panes will remain 50/50 even as the terminal is resized (https://github.com/zellij-org/zellij/issues/406)
* The terminal can now be resized without leaving fullscreen mode
... |
rust_dataset_chunk_520023 | rust_dataset.txt | 520,023 | 512 | 0.15.0] - 2021-07-19
* Kill children properly (https://github.com/zellij-org/zellij/pull/601)
* Change name of `Run` binding for actions (https://github.com/zellij-org/zellij/pull/602)
* Add running commands to `layouts` (https://github.com/zellij-org/zellij/pull/600)
POSSIBLE BREAKING CHANGE for custom layouts:
P... |
rust_dataset_chunk_520024 | rust_dataset.txt | 520,024 | 512 | INSZ / ioctl() integer type mismatch (https://github.com/zellij-org/zellij/pull/547)
* Fix(ui): session mode should be disabled in locked mode (https://github.com/zellij-org/zellij/pull/548)
* Add option to start in arbitrary modes (https://github.com/zellij-org/zellij/pull/513)
* Attaching to a session respects the `d... |
rust_dataset_chunk_520025 | rust_dataset.txt | 520,025 | 512 | ellij-org/zellij/pull/531)
* Terminal compatibility: Support wide characters (https://github.com/zellij-org/zellij/pull/535)
## [0.11.0] - 2021-05-15
This version is mostly an installation hotfix.
* Add `check` flag to `setup` subcommand, move `generate-completions` subcommand to `setup` flag (https://github.com/zel... |
rust_dataset_chunk_520026 | rust_dataset.txt | 520,026 | 512 | github.com/zellij-org/zellij/pull/471)
* Terminal Compatibility: various behaviour fixes (https://github.com/zellij-org/zellij/pull/486)
* Fix handling of `$HOME` `config` directory, especially relevant for darwin systems (https://github.com/zellij-org/zellij/pull/487)
## [0.8.0] - 2021-05-07
* Terminal compatibility:... |
rust_dataset_chunk_520027 | rust_dataset.txt | 520,027 | 512 | -org/zellij/pull/392)
* Implemented simple plugin timers via the `set_timeout()` call (https://github.com/zellij-org/zellij/pull/394)
* Added more configuration locations, changed `ZELLIJ_CONFIG` to `ZELLIJ_CONFIG_FILE` (https://github.com/zellij-org/zellij/pull/391)
* Improved keybind handling (https://github.com/zell... |
rust_dataset_chunk_520028 | rust_dataset.txt | 520,028 | 512 | race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what ... |
rust_dataset_chunk_520029 | rust_dataset.txt | 520,029 | 512 | .html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
--- FILE: zellij/CONTRIBUTING.md ---
# Contributing to Zellij
Thanks for considering contributing to Zellij!
**First**: if you're unsure of anything, feel... |
rust_dataset_chunk_520030 | rust_dataset.txt | 520,030 | 512 | ellij (optionally with additional arguments)
cargo xtask run
cargo xtask run -- -l strider
# Install Zellij to some directory
cargo xtask install /path/of/zellij/binary
# Publish the zellij and zellij-tile crates
cargo xtask publish
```
You can see a list of all commands (with supported arguments) with `cargo xtask
--... |
rust_dataset_chunk_520031 | rust_dataset.txt | 520,031 | 512 | ellij/plugins/
# 3. build zellij without bundled plugins
PREFIX=/usr cargo build --release --bin zellij \
--no-default-features --features disable_automatic_asset_installation
```
With the `disable_automatic_asset_installation` feature no plugin is embedded into the
binary and `zellij setup --dump-plugins` is unava... |
rust_dataset_chunk_520032 | rust_dataset.txt | 520,032 | 512 | docker compose` installed.
Once you do, in the repository root:
1. `docker compose up -d` will start up the docker container
2. `cargo xtask ci e2e --build` will build the Zellij binary in the target folder, which is shared with the container
3. `cargo xtask ci e2e --test` will run the tests
To re-run the tests after... |
rust_dataset_chunk_520033 | rust_dataset.txt | 520,033 | 512 | attached as release assets. The
delay in toolchain updates is due to a certain amount of manual testing that is
performed afterward.
At this point in time, there is no MSRV policy. As our resources are limited,
we try to focus on making the code work with whatever development toolchain is
currently mentioned in `rust... |
rust_dataset_chunk_520034 | rust_dataset.txt | 520,034 | 512 | ://github.com/zellij-org/zellij/blob/main/docs/ERROR_HANDLING.md#attaching-context
[error-docs-result]: https://github.com/zellij-org/zellij/blob/main/docs/ERROR_HANDLING.md#converting-a-function-to-return-a-result-type
[error-docs-logging]: https://github.com/zellij-org/zellij/blob/main/docs/ERROR_HANDLING.md#logging-... |
rust_dataset_chunk_520035 | rust_dataset.txt | 520,035 | 512 | .org/en/v1.0.0/) where
sufficiently large or impactful change is made.
- Provide a **description of the changes** in as many details as necessary.
Before submitting your pull request, also make sure that the following
conditions are met:
- Your new code **adheres to the code style** through running `cargo fmt`.... |
rust_dataset_chunk_520036 | rust_dataset.txt | 520,036 | 512 | -l zellij.kdl` at the root of this repository. This will open a development environment that will help you develop the plugin inside Zellij.
It can also be used if you prefer developing outside of the terminal - in this case you should ignore the `$EDITOR` pane and use your IDE instead.
### Otherwise
1. Build the p... |
rust_dataset_chunk_520037 | rust_dataset.txt | 520,037 | 512 | that connects to a single pty (pseudo terminal) and (presumably) has one shell or other program running inside it.
The TerminalPane has two main roles:
* Keeping track of the Scroll, which represents the buffer of lines in this terminal
* Interpreting the ANSI/VT instructions coming from the pty in order to adjust... |
rust_dataset_chunk_520038 | rust_dataset.txt | 520,038 | 512 | the next character to be blue.
## Boundaries (zellij-server/src/ui/boundaries.rs)
The Boundaries refer to those lines that are drawn between terminal panes. A few things that happen here:
* The Rect trait is here so that different panes can implement it, giving boundaries a generic way to calculate the size of the ... |
rust_dataset_chunk_520039 | rust_dataset.txt | 520,039 | 512 | issue][tracking_issue] to see what has already been
done.
# Error handling facilities
You get access to all the relevant functions and traits mentioned in the
remainder of this document by including/adding this in the code you're working
on:
```rust
use zellij_utils::errors::prelude::*;
```
## Displaying panic mes... |
rust_dataset_chunk_520040 | rust_dataset.txt | 520,040 | 512 | and can also help developers in quickly identifying
which parts of the code to debug if necessary.
When you encounter such a fatal error and cannot propagate it further up (e.g.
because the current function cannot be changed to return a [`Result`][result],
or because it is the "root" function of a program thread), us... |
rust_dataset_chunk_520041 | rust_dataset.txt | 520,041 | 512 | If sending the message to the
server fails, execution is terminated and the program crashes. Let's assume
that crashing the application in this case is a reasonable course of action.
In total (as of writing this), the `render()` function is called 80 times from
various places in the code of the `Screen` struct. Hence... |
rust_dataset_chunk_520042 | rust_dataset.txt | 520,042 | 512 | expect` is a good candidate to be
rewritten to return a `Result` type instead.
## Attaching context
[Anyhow][anyhow]s [`Context`][context] trait gives us two methods to attach
context to an error: `context` and `with_context`. You should use `context`
if the message contains only a static text and `with_context` if ... |
rust_dataset_chunk_520043 | rust_dataset.txt | 520,043 | 512 | . in what context the error occurred. In the
`render` method, we could have done something like this instead:
```rust
pub fn render(&mut self) -> Result<()> {
// ...
for tab_index in tabs_to_close {
// ...
self.close_tab_at_index(tab_index)
.context("Failed ... |
rust_dataset_chunk_520044 | rust_dataset.txt | 520,044 | 512 | the functions are called from this
central location, we forego attaching a context message to every error.
Instead, we propagate the errors to the caller of this function, which happens
to be the function `init_session` in `zellij-server/src/lib.rs`. We see that
`screen_thread_main` is spawned to run in a separate thr... |
rust_dataset_chunk_520045 | rust_dataset.txt | 520,045 | 512 | " means, we
attach a description manually. The second context:
```rust
.with_context(|| format!("failed to move clients from tab {source_tab_index} to tab {destination_tab_index}"))?;
```
then describes what the surrounding function was trying to achieve (See
descriptions above).
## Logging errors
> **TL;D... |
rust_dataset_chunk_520046 | rust_dataset.txt | 520,046 | 512 | Hence, you mustn't ignore it.
Also note that, even though we log the error and continue, we still attach
context information to it. Just like with fatal errors, the context information
allows us to tell what we tried to do before we got the error and logged it.
This is a simple example, and oftentimes the `Result` y... |
rust_dataset_chunk_520047 | rust_dataset.txt | 520,047 | 512 | >` attached to `Err`. This is necessary because at this point
Rust cannot determine on its own what the `Ok` value of the `Result` we create
may be. This isn't relevant for our case, because we *know* the `Result` will
never be an `Ok` variant, but Rust still requires this.
If you're getting errors about "type annotat... |
rust_dataset_chunk_520048 | rust_dataset.txt | 520,048 | 512 | error can look, for example, like this:
```rust
match pty
.spawn_terminal(terminal_action, client_or_tab_index)
.with_context(err_context) // <-- Note how we attach a context, but can
// still recover the error below!
{
Ok(_) => {
// ... Whatever
},
Err... |
rust_dataset_chunk_520049 | rust_dataset.txt | 520,049 | 512 | .gz` (with a
`zellij-desktop-files.sha256sum`) holding a `share/` folder laid out like
`/usr/share`. The binary archives hold only the binary. Install the folder's
contents alongside the `zellij` binary so the desktop app shows up in
application menus and software centres:
| File in `zellij-desktop-files.tar.gz` | Ins... |
rust_dataset_chunk_520050 | rust_dataset.txt | 520,050 | 512 | never writes its own copy.
- A desktop entry or default-terminal setting that Zellij writes itself only ever
runs a binary in a permanent place: a package-manager path (Nix, Homebrew,
`cargo install`, `/usr` outside `/usr/local`), a system folder (`/usr/local`
or `/opt`), or Zellij's own copy in `~/.local/bin`. ... |
rust_dataset_chunk_520051 | rust_dataset.txt | 520,051 | 512 | In order for
`cargo` to pick this up and be able to work with it, we must perform a few
modifications to the zellij repository and other components. Once setup, we
release a zellij version to this private registry and install zellij from there
to make sure it works as expected.
### Step-by-step guide
1. Create a ca... |
rust_dataset_chunk_520052 | rust_dataset.txt | 520,052 | 512 | with the following content:
```
[registries.ktra]
index = "https://$INDEX_REPO"
```
1. Install `ktra`, the registry server: `cargo install ktra`
1. In a separate shell/pane/whatever, navigate to some folder where you
want to store all data for the registry
1. Create a con... |
rust_dataset_chunk_520053 | rust_dataset.txt | 520,053 | 512 | be done in a few minutes and all the
crates are published to the private `ktra` registry!
1. Testing the release binary
1. Install zellij from the registry to some local directory like this:
```bash
$ cargo install --registry ktra --root /tmp zellij
```
1. Execute the binary to see ... |
rust_dataset_chunk_520054 | rust_dataset.txt | 520,054 | 512 | , here they will be referred to as primary/secondary).
The primary part is the part connected to the terminal emulator. The emulator listens to this part of the channel, reads instructions from it that it uses in order to draw characters on the screen.
The secondary part is used by the program running inside the termi... |
rust_dataset_chunk_520055 | rust_dataset.txt | 520,055 | 512 | `Ctrl: "\n"` instead of `Ctrl: '\n'`
--- FILE: zellij/example/themes/README.md ---
# Themes
It contains examples showing how to write a theme.
If you would like to add a theme to zellij, please refer [zellij-utils/assets/themes](../../zellij-utils/assets/themes).
--- FILE: zellij/.github/ISSUE_TEMPLATE/bug_report... |
rust_dataset_chunk_520056 | rust_dataset.txt | 520,056 | 512 | you are welcome to ask for help either in the issue itself or in one of our community chats (Discord / Matrix). We will be happy to try and assist or suggest directions, but please note that the responsibility to troubleshoot the issue and find the problem is ultimately on your shoulders. For the removal of doubt: a Z... |
rust_dataset_chunk_520057 | rust_dataset.txt | 520,057 | 512 | want to use Zellij for what it can do, rather than trying to make it behave like something it does not want to be. Thank you for understanding! **
-->
--- FILE: zellij/.github/ISSUE_TEMPLATE/plugin_API.md ---
---
name: Plugin API
about: You are developing a plugin and need something
title: ''
labels: ["plugin syste... |
rust_dataset_chunk_520058 | rust_dataset.txt | 520,058 | 512 | make decisions on their own and to bring larger and more controversial decisions to be decided by the full quorum of members in a real-time meeting or by correspondence.
## BDFL (Benevolent Dictator for Life)
Aram Drevekenin (@imsnif) is in charge of steering the project and making large decisions regarding finances ... |
rust_dataset_chunk_520059 | rust_dataset.txt | 520,059 | 512 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
--- FILE: zellij/README.md ---
<h1 align="center">
<br>
<img src="https://raw.githubuse... |
rust_dataset_chunk_520060 | rust_dataset.txt | 520,060 | 512 | a-46b5-939e-f562e3b2dd7f" alt="Sponsored by"></picture>
<a href="https://www.gresearch.com/"><picture><source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/d609936a-abf8-4406-8cfc-889f76a09d74"><img src="https://github.com/user-attachments/assets/742ae902-fe9d-... |
rust_dataset_chunk_520061 | rust_dataset.txt | 520,061 | 512 | I install it?
The easiest way to install Zellij is through a [package for your OS](./docs/THIRD_PARTY_INSTALL.md).
If one is not available for your OS, you could download a prebuilt binary from the [latest release](https://github.com/zellij-org/zellij/releases/latest) and place it in your `$PATH`. If you'd like, we ... |
rust_dataset_chunk_520062 | rust_dataset.txt | 520,062 | 512 | website where you can directly click on every issue***
[](https://zellij.dev/roadmap)
## Origin of the Name
[From Wikipedia, the free encyclopedia](https://en.wikipedia.org/wiki/Zellij)
Zellij (Arabic: الزليج, romanized: zill... |
rust_dataset_chunk_520063 | rust_dataset.txt | 520,063 | 512 | THE SOFTWARE IS PROVIDED \ldblquote AS IS\rdblquote , WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABI... |
rust_dataset_chunk_520064 | rust_dataset.txt | 520,064 | 512 | to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
Permission & Conditions
------------------------
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, a... |
rust_dataset_chunk_520065 | rust_dataset.txt | 520,065 | 512 | ABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
--- FILE: zellij/zellij-terminal/assets/fonts/LICENSE-NotoColorEmoji.md ---
Copyright 2022 Google Inc.
This Font Software is licensed under the SIL Open Font License,
Version 1.1.
This license is copied below, and is also available wi... |
rust_dataset_chunk_520066 | rust_dataset.txt | 520,066 | 512 | or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers o... |
rust_dataset_chunk_520067 | rust_dataset.txt | 520,067 | 512 | PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font
creation efforts of academic and linguistic communities, and to
provide a free and open framework in which fonts may be shared and
improved in partnership with others.
The OFL al... |
rust_dataset_chunk_520068 | rust_dataset.txt | 520,068 | 512 | Name(s) unless explicit written permission is granted by the
corresponding Copyright Holder. This restriction only applies to the
primary font name as presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified ... |
rust_dataset_chunk_520069 | rust_dataset.txt | 520,069 | 512 | OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
--- FILE: zellij/zellij-utils/assets/completions/README.md ---
Extra completion files that get appended to the
clap output, in order to support d... |
rust_dataset_chunk_520070 | rust_dataset.txt | 520,070 | 512 | cargo:rerun-if-changed=templates/");
println!("cargo:rerun-if-changed=tests/");
generate_completions(Bash)?;
generate_completions(Elvish)?;
generate_completions(Fig)?;
generate_completions(Fish)?;
generate_completions(Nushell)?;
generate_completions(PowerShell)?;
generate_completions(Zs... |
rust_dataset_chunk_520071 | rust_dataset.txt | 520,071 | 512 | .unwrap_or(1.0);
db.add_update(path, by, now);
}
if db.dirty() {
db.age(max_age);
}
db.save()
}
}
--- FILE: zoxide/src/cmd/cmd.rs ---
#![allow(clippy::module_inception)]
use std::path::PathBuf;
use clap::builder::{IntoResettable, Resettable, StyledStr};
u... |
rust_dataset_chunk_520072 | rust_dataset.txt | 520,072 | 512 | or initialize it with if it
/// doesn't
#[clap(short, long)]
pub score: Option<f64>,
}
/// Edit the database
#[derive(Debug, Parser)]
#[clap(
author,
help_template = HelpTemplate,
)]
pub struct Edit {
#[clap(subcommand)]
pub cmd: Option<EditCommand>,
}
#[derive(Clone, Debug, Subcommand)]
... |
rust_dataset_chunk_520073 | rust_dataset.txt | 520,073 | 512 | Clone, Debug)]
pub enum InitShell {
Bash,
Elvish,
Fish,
Nushell,
#[clap(alias = "ksh")]
Posix,
Powershell,
Tcsh,
Xonsh,
Zsh,
}
/// Search for a directory in the database
#[derive(Debug, Parser)]
#[clap(
author,
help_template = HelpTemplate,
)]
pub struct Query {
pub... |
rust_dataset_chunk_520074 | rust_dataset.txt | 520,074 | 512 | let stdout = &mut io::stdout().lock();
for dir in db.dirs().iter().rev() {
write!(stdout, "{}\0", dir.display().with_score(now).with_separator('\t'))
.pipe_exit("fzf")?;
}
Ok(())
}
None => {
... |
rust_dataset_chunk_520075 | rust_dataset.txt | 520,075 | 512 | )?,
ImportFrom::Z => import::run(&import::Z {}, &mut db)?,
ImportFrom::ZLua => import::run(&import::ZLua {}, &mut db)?,
ImportFrom::ZshZ => import::run(&import::ZshZ {}, &mut db)?,
}
db.save()
}
}
--- FILE: zoxide/src/cmd/init.rs ---
use std::io::{self, Write};... |
rust_dataset_chunk_520076 | rust_dataset.txt | 520,076 | 512 | ::Import(cmd) => cmd.run(),
Cmd::Init(cmd) => cmd.run(),
Cmd::Query(cmd) => cmd.run(),
Cmd::Remove(cmd) => cmd.run(),
}
}
}
--- FILE: zoxide/src/cmd/query.rs ---
use std::io::{self, Write};
use anyhow::{Context, Result};
use crate::cmd::{Query, Run};
use crate::config... |
rust_dataset_chunk_520077 | rust_dataset.txt | 520,077 | 512 | let dir = if self.score { dir.display().with_score(now) } else { dir.display() };
writeln!(handle, "{dir}").pipe_exit("stdout")?;
}
Ok(())
}
fn query_first(&self, stream: &mut Stream, now: Epoch) -> Result<()> {
let handle = &mut io::stdout();
let mut dir = stream.... |
rust_dataset_chunk_520078 | rust_dataset.txt | 520,078 | 512 | db::Database;
use crate::util;
impl Run for Remove {
fn run(&self) -> Result<()> {
let mut db = Database::open()?;
for path in &self.paths {
if !db.remove(path) {
let path_abs = util::resolve_path(path)?;
let path_abs = util::path_to_str(&path_abs)?;
... |
rust_dataset_chunk_520079 | rust_dataset.txt | 520,079 | 512 | _str().context("invalid unicode in _ZO_MAXAGE")?;
let maxage = maxage
.parse::<u32>()
.with_context(|| format!("unable to parse _ZO_MAXAGE as integer: {maxage}"))?;
Ok(maxage as Rank)
})
}
pub fn resolve_symlinks() -> bool {
env::var_os("_ZO_RESOLVE_SYMLINKS").is_some_an... |
rust_dataset_chunk_520080 | rust_dataset.txt | 520,080 | 512 | {}", self.separator)?;
}
write!(f, "{}", self.dir.path)
}
}
pub type Rank = f64;
pub type Epoch = u64;
--- FILE: zoxide/src/db/mod.rs ---
mod dir;
mod stream;
use std::borrow::Cow;
use std::io::Write as _;
use std::path::{Path, PathBuf};
use std::{fs, io};
use anyhow::{Context, Result, bail};
u... |
rust_dataset_chunk_520081 | rust_dataset.txt | 520,081 | 512 | match fs::read(&path_legacy) {
Ok(bytes) => {
return Self::try_new(path, bytes, |bytes| Self::deserialize_legacy(bytes), true)
.with_context(|| {
format!("could not parse database: {}", path_legacy.display())
});
}
... |
rust_dataset_chunk_520082 | rust_dataset.txt | 520,082 | 512 | , last_accessed: now })
});
self.with_dirty_mut(|dirty| *dirty = true);
}
/// Increments the rank and updates the last_accessed of a directory, or
/// creates it if it does not exist.
pub fn add_update(&mut self, path: impl AsRef<str> + Into<String>, by: Rank, now: Epoch) {
self... |
rust_dataset_chunk_520083 | rust_dataset.txt | 520,083 | 512 | {
for idx in (1..dirs.len()).rev() {
// Check if curr_dir and next_dir have equal paths.
let curr_dir = &dirs[idx];
let next_dir = &dirs[idx - 1];
if next_dir.path != curr_dir.path {
continue;
}
... |
rust_dataset_chunk_520084 | rust_dataset.txt | 520,084 | 512 | -> Result<Vec<Dir<'_>>> {
let bytes = bytes.strip_prefix(UTF8_BOM).unwrap_or(bytes);
let mut dirs = Vec::new();
let mut errors = Vec::new();
for (idx, line) in bytes.split(|byte| *byte == b'\n').enumerate() {
match Self::deserialize_line(line) {
Ok(Some(dir... |
rust_dataset_chunk_520085 | rust_dataset.txt | 520,085 | 512 | .
const MAX_SIZE: u64 = 32 << 20; // 32 MiB
const VERSION: u32 = 3;
let (bytes_version, bytes_dirs) =
bytes.split_at_checked(size_of::<u32>()).context("corrupted data")?;
let deserializer = &mut bincode::options().with_fixint_encoding().with_limit(MAX_SIZE);
let vers... |
rust_dataset_chunk_520086 | rust_dataset.txt | 520,086 | 512 | ().unwrap();
let path = if cfg!(windows) { r"C:\foo\bar" } else { "/foo/bar" };
let now = 946684800;
{
let mut db = Database::open_dir(data_dir.path()).unwrap();
db.add(path, 1.0, now);
db.save().unwrap();
}
{
let mut db = Databas... |
rust_dataset_chunk_520087 | rust_dataset.txt | 520,087 | 512 | Some(base_dir) => Path::new(path).starts_with(base_dir),
None => true,
}
}
fn filter_by_exclude(&self, path: &str) -> bool {
!self.options.exclude.iter().any(|pattern| pattern.matches(path))
}
fn filter_by_exists(&self, path: &str) -> bool {
if !self.options.exists... |
rust_dataset_chunk_520088 | rust_dataset.txt | 520,088 | 512 | Self {
StreamOptions {
now,
keywords: Vec::new(),
exclude: Vec::new(),
exists: false,
resolve_symlinks: false,
ttl: now.saturating_sub(3 * MONTH),
base_dir: None,
}
}
pub fn with_keywords<I>(mut self, keywords:... |
rust_dataset_chunk_520089 | rust_dataset.txt | 520,089 | 512 | /", "/bar"], "/foo/baz/bar", true)]
fn query(#[case] keywords: &[&str], #[case] path: &str, #[case] is_match: bool) {
let db = &mut Database::new(PathBuf::new(), Vec::new(), |_| Vec::new(), false);
let options = StreamOptions::new(0).with_keywords(keywords.iter());
let stream = Stream::new(d... |
rust_dataset_chunk_520090 | rust_dataset.txt | 520,090 | 512 | ::piped())
.spawn()
.context("failed to run `atuin`; is it installed and on PATH?")?;
let stdout = child.stdout.take().expect("stdout piped");
let reader = BufReader::new(stdout);
Ok(Iter::new(reader, child))
}
}
/// Iterates atuin's NUL-separated `{time}\t{directory... |
rust_dataset_chunk_520091 | rust_dataset.txt | 520,091 | 512 | .buf) {
Ok(0) => return None,
Ok(_) => {
if self.buf.last() == Some(&b'\0') {
self.buf.pop();
}
if self.buf.is_empty() {
continue;
}
let re... |
rust_dataset_chunk_520092 | rust_dataset.txt | 520,092 | 512 | 8]) -> Result<Dir<'static>, ImportError> {
let line =
str::from_utf8(line).map_err(|e| self.err(anyhow!(e).context("invalid utf-8")))?;
let (rank, path) =
line.split_once('\t').ok_or_else(|| self.err(anyhow!("invalid entry: {line}")))?;
let rank = rank
.parse... |
rust_dataset_chunk_520093 | rust_dataset.txt | 520,093 | 512 | home_dir().context("could not find home directory")?;
path.push("Library");
path
} else if cfg!(target_os = "windows") {
let appdata = env::var_os("APPDATA").context("%APPDATA% is not set")?;
PathBuf::from(appdata)
} else if let Some(xdg) = env::var_os("XDG_DATA_HOME") {
... |
rust_dataset_chunk_520094 | rust_dataset.txt | 520,094 | 512 | use crate::import::atuin::Atuin;
pub(crate) use crate::import::autojump::Autojump;
pub(crate) use crate::import::fasd::Fasd;
pub(crate) use crate::import::z::Z;
pub(crate) use crate::import::z_lua::ZLua;
pub(crate) use crate::import::zsh_z::ZshZ;
mod atuin;
mod autojump;
mod fasd;
mod z;
mod z_lua;
mod zsh_z;
use st... |
rust_dataset_chunk_520095 | rust_dataset.txt | 520,095 | 512 | checked(dir.path, dir.rank, dir.last_accessed);
}
Err(e) => {
let location = match &e.path {
Some(path) => format!("{}:{}", path.display(), e.line_num),
None => format!("line {}", e.line_num),
};
_ = writeln!... |
rust_dataset_chunk_520096 | rust_dataset.txt | 520,096 | 512 | _init():
/// local _zl_data = os.getenv('_ZL_DATA')
/// if _zl_data ~= nil and _zl_data ~= "" then
/// if windows then
/// DATA_FILE = _zl_data
/// else
/// -- avoid windows environments affect cygwin & msys
/// if not string.match(_zl_data, '^%a:[/\\]') then
/// DATA_FILE = ... |
rust_dataset_chunk_520097 | rust_dataset.txt | 520,097 | 512 | _alphabetic()
&& bytes[1] == b':'
&& (bytes[2] == b'/' || bytes[2] == b'\\')
}
--- FILE: zoxide/src/import/z.rs ---
use std::borrow::Cow;
use std::fs::File;
use std::io::{BufRead, BufReader};
use std::path::PathBuf;
use std::{env, str};
use anyhow::{Context, Result, anyhow};
use crate::db::Dir;
use ... |
rust_dataset_chunk_520098 | rust_dataset.txt | 520,098 | 512 | _| err())?;
let path = split.next().ok_or_else(err)?;
Ok(Dir { path: Cow::Owned(path.to_string()), rank, last_accessed })
}
}
impl<R: BufRead> Iterator for Iter<R> {
type Item = Result<Dir<'static>, ImportError>;
fn next(&mut self) -> Option<Self::Item> {
loop {
self.... |
rust_dataset_chunk_520099 | rust_dataset.txt | 520,099 | 512 | ))
}
}
/// Mirrors zsh-z's path logic:
///
/// ```sh
/// # Allow the user to specify a custom datafile in $ZSHZ_DATA (or legacy $_Z_DATA)
/// local custom_datafile="${ZSHZ_DATA:-$_Z_DATA}"
/// # If the user specified a datafile, use that or default to ~/.z
/// local datafile=${${custom_datafile:-$HOME/.z}:A}
/// `... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.