Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
raphCode committed Mar 16, 2022
2 parents 55e569e + 2e03692 commit 8d9e8a7
Show file tree
Hide file tree
Showing 134 changed files with 9,056 additions and 2,155 deletions.
31 changes: 31 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Consistent coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4

[*.md]
# double whitespace at end of line
# denotes a line break in Markdown
trim_trailing_whitespace = false

[*.yml]
indent_size = 2

# Ignore diffs/patches
[*.{diff,patch}]
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset


# Ignore generated files
[*.lock]
indent_size = unset
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
13 changes: 13 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# These are supported funding model platforms

github: [imsnif]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
23 changes: 23 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,26 @@ updates:
directory: "/"
schedule:
interval: "weekly"

# We want to be more sure in our e2e-test, before committing to
# update all of our dependencies.
# Only add packages very sporadically here for now.
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
allow:
# Allow only direct updates
- dependency-name: "log"
- package-ecosystem: "cargo"
directory: "/zellij-utils/"
schedule:
interval: "weekly"
allow:
# Allow only direct updates
- dependency-name: "log"
- dependency-name: "log4rs"
- dependency-name: "clap"
- dependency-name: "clap_complete"


4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
ssh:
image: ghcr.io/linuxserver/openssh-server
env:
PUID: 1000
PUID: 1001
PGID: 1000
TZ: Europe/Vienna
PASSWORD_ACCESS: true
Expand All @@ -28,7 +28,7 @@ jobs:
- 2222:2222
options: -v ${{ github.workspace }}/target:/usr/src/zellij --name ssh
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Add WASM target
run: rustup target add wasm32-wasi
- name: Install musl-tools
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: nix

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
check:
runs-on: ubuntu-latest
name: "nix check"
environment: cachix
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
with:
# Nix Flakes doesn't work on shallow clones
fetch-depth: 0
- uses: cachix/install-nix-action@v16
with:
extra_nix_config: |
experimental-features = nix-command flakes
fetch-depth: 0
- uses: cachix/cachix-action@v10
with:
name: zellij
# If you chose API tokens for write access OR if you have a private cache
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix develop .#fmtShell --command treefmt --fail-on-change
## nix flake check still fails on IFD
#- run: nix flake check --print-build-logs --show-trace

build:
runs-on: ubuntu-latest
name: "nix build"
environment: cachix
timeout-minutes: 25
steps:
- uses: actions/checkout@v3
with:
# Nix Flakes doesn't work on shallow clones
fetch-depth: 0
- uses: cachix/install-nix-action@v16
with:
extra_nix_config: |
experimental-features = nix-command flakes
fetch-depth: 0
- uses: cachix/cachix-action@v10
with:
name: zellij
# If you chose API tokens for write access OR if you have a private cache
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build
develop:
runs-on: ubuntu-latest
name: "nix develop"
environment: cachix
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
with:
# Nix Flakes doesn't work on shallow clones
fetch-depth: 0
- uses: cachix/install-nix-action@v16
with:
extra_nix_config: |
experimental-features = nix-command flakes
fetch-depth: 0
- uses: cachix/cachix-action@v10
with:
name: zellij
# If you chose API tokens for write access OR if you have a private cache
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix develop --profile devShell
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
fi
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/cache@v2
with:
path: |
Expand All @@ -44,7 +44,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/cache@v2
with:
path: |
Expand All @@ -63,7 +63,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/cache@v2
with:
path: |
Expand All @@ -72,7 +72,8 @@ jobs:
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install cargo-make
run: test -x "${HOME}/.cargo/bin/cargo-make" || cargo install --debug cargo-make
- name: Check Lints
run: cargo make clippy -D clippy::all
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
23 changes: 23 additions & 0 deletions .github/workflows/update-flake-lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: update-flake-lock
on:
workflow_dispatch: # allows manual triggering
schedule:
- cron: '0 0 * * 0' # runs weekly on Sunday at 00:00

jobs:
lockfile:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Nix
uses: cachix/install-nix-action@v16
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@v8
with:
pr-labels: |
dependencies
nix
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@ target/
*.new
.vscode
.vim
.DS_Store
.DS_Store
/assets/man/zellij.1

# nix
.direnv/
result
result-*
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,47 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## [Unreleased]

## [0.26.1] - 2022-03-16
* HOTFIX: Paste regression (https://github.com/zellij-org/zellij/commit/08d2014cfea1583059338a338bc4d5f632763fdb)
* Add: add error reporting system (https://github.com/zellij-org/zellij/pull/1038)
* Fix: switch to annotated release tags (https://github.com/zellij-org/zellij/pull/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 compatibility: set terminal title properly (https://github.com/zellij-org/zellij/pull/1094)
* Fix: handle discontiguous STDIN input (https://github.com/zellij-org/zellij/issues/1117)
* Terminal compatibility: fix alternate screen clearing (https://github.com/zellij-org/zellij/pull/1120)
* Add: information about clippy lints (https://github.com/zellij-org/zellij/pull/1126)
* Bump `suggestion` dependency (https://github.com/zellij-org/zellij/pull/1124)
* Add: detach `action` to `tmux-mode` (https://github.com/zellij-org/zellij/pull/1116)
* Add: initial `nix` support (https://github.com/zellij-org/zellij/pull/1131)
* Fix: unused code warnings (https://github.com/zellij-org/zellij/pull/1087)
* Add: support `cargo-binstall` (https://github.com/zellij-org/zellij/pull/1129)
* Fix: do not use current cursor style in csi erase display (solve `btm` rendering issue) (https://github.com/zellij-org/zellij/pull/1142)
* Fix: ensure e2e tests use current plugins (https://github.com/zellij-org/zellij/pull/1047)
* Add: manpage to nix package (https://github.com/zellij-org/zellij/pull/1148)
* Fix: terminal title passthrough on not showing pane frames (https://github.com/zellij-org/zellij/pull/1113)
* Add: ability to set `ENVIRONMENT VARIABLES` inside of the config and layout's (https://github.com/zellij-org/zellij/pull/1154)
* Add: binary cache to zellij `cachix use zellij` (https://github.com/zellij-org/zellij/pull/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 CHANGE for people that relied on the
error code and the stdout of this command on fail.
* Add: dynamic completions for `fish` shell (https://github.com/zellij-org/zellij/pull/1176)
* Fix: typo in completion (https://github.com/zellij-org/zellij/pull/1183)
* Fix: improve detach instruction (https://github.com/zellij-org/zellij/pull/1161)
* Fix: update tooltip after hiding floating panes with mouse (https://github.com/zellij-org/zellij/pull/1186)
* Fix: do not start move floating pane when selecting with mouse and cursor leaves pane (https://github.com/zellij-org/zellij/pull/1186)
* Terminal compatibility: replace wide-characters under cursor properly (https://github.com/zellij-org/zellij/pull/1196)
* Terminal compatibility: only adjust home and end keys in cursor keys mode (https://github.com/zellij-org/zellij/pull/1190)
* Add: initial support for forwarding mouse events to applications (`SGR` format only) (https://github.com/zellij-org/zellij/pull/1191)
* Fix: allow `POSIX` style overrides for most config flags (https://github.com/zellij-org/zellij/pull/1205)

## [0.25.0] - 2022-02-22
* Fix: replace the library with the dependency problem (https://github.com/zellij-org/zellij/pull/1001)
* Fix: crash when opening pane in non-existent cwd (https://github.com/zellij-org/zellij/pull/995)
* Feature: add `copy-command` option (https://github.com/zellij-org/zellij/pull/996)
Expand All @@ -18,6 +59,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
* Compatibility: disable scrollback in alternate screen (https://github.com/zellij-org/zellij/pull/1032)
* Feature: add `copy-clipboard` option (https://github.com/zellij-org/zellij/pull/1022)
* Fix: update the confusing tips on `RenamePane` (https://github.com/zellij-org/zellij/pull/1045)
* Feature: add floating panes (https://github.com/zellij-org/zellij/pull/1066)
* Fix: bump up internal `autocfg` dependency to `1.1.0` (https://github.com/zellij-org/zellij/pull/1071)
* Feature: add tmux mode (https://github.com/zellij-org/zellij/pull/1073)
* Fix: improve copy of wrapped lines (https://github.com/zellij-org/zellij/pull/1069)
* Fix: prefer last active pane when changing focus (https://github.com/zellij-org/zellij/pull/1076)

## [0.24.0] - 2022-01-05
* Terminal compatibility: properly handle insertion of characters in a line with wide characters (https://github.com/zellij-org/zellij/pull/964)
Expand Down
28 changes: 25 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to Zellij

Thanks for considering to contribute to Zellij!
Thanks for considering contributing to Zellij!

**First**: if you're unsure of anything, feel free to ask on our [Discord
server](https://discord.gg/MHV3n76PDq). We're a friendly and welcoming bunch!
Expand All @@ -12,7 +12,7 @@ all contributors are expected to adhere to.

## Building
To build Zellij, we're using cargo-make – you can install it by running `cargo
install --force cargo-make`.
install --force cargo-make`.

To edit our manpage, the mandown crate (`cargo install
mandown`) is used and the work is done on a markdown file in docs/MANPAGE.md.
Expand Down Expand Up @@ -45,6 +45,20 @@ version `wasm-opt --version` > 97, for it's command `wasm-opt`.

To run `test`, you will need the package `pkg-config` and a version of `openssl`.

<details>
<summary>Should you be a `nix` (linux/macOs) user, you can use the following
commands in order to get set up: (expand)</summary>

- `nix develop`
Download and set up dependencies.
- `nix build`
Build the binary in the `result` directory. (--release)
- `nix run`
Run the binary.
- `cachix use zellij`
Will use our binary cache as a substituter.
</details>

## Running the end-to-end tests
Zellij includes some end-to-end tests which test the whole application as a black-box from the outside.
These tests work by running a docker container which contains the Zellij binary, connecting to it via ssh, sending some commands and comparing the output received against predefined snapshots.
Expand All @@ -59,7 +73,8 @@ These tests work by running a docker container which contains the Zellij binary,
5. `export CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=$CC_x86_64_unknown_linux_musl`
</details>

To run these tests locally, you'll need to have both `docker` and `docker-compose` installed.

To run these tests locally, you'll need to have either `docker` or `podman` and also `docker-compose` installed.
Once you do, in the repository root:

1. `docker-compose up -d` will start up the docker container
Expand All @@ -68,6 +83,13 @@ Once you do, in the repository root:

To re-run the tests after you've changed something in the code base, be sure to repeat steps 2 and 3.

## How we treat clippy lints

We currently use clippy in [GitHub Actions](https://github.com/zellij-org/zellij/blob/main/.github/workflows/rust.yml) with the default settings that report only [`clippy::correctness`](https://github.com/rust-lang/rust-clippy#readme) as errors and other lints as warnings because Zellij is still unstable. This means that all warnings can be ignored depending on the situation at that time, even though they are also helpful to keep the code quality.
Since we just cannot afford to manage them, we are always welcome to fix them!

Here is [the detailed discussion](https://github.com/zellij-org/zellij/pull/1090) if you want to see it.

## Looking for something to work on?

If you are new contributor to `Zellij` going through
Expand Down
Loading

0 comments on commit 8d9e8a7

Please sign in to comment.