Skip to content
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

feat(term): termios package #35

Merged
merged 25 commits into from
Feb 2, 2024
Merged

feat(term): termios package #35

merged 25 commits into from
Feb 2, 2024

Conversation

caarlos0
Copy link
Member

@caarlos0 caarlos0 commented Feb 1, 2024

This will help us remove the dep on u-root/u-root from /ssh, and also adds support to netbsd.

The api is different, and it does not use reflection.

This will help us remove the dep on u-root/u-root from /ssh, and also
adds support to netbsd.

This one is less generic though, and specifically made to be used with
ssh.TerminalModes, which is our main use case for now.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@caarlos0 caarlos0 added the enhancement New feature or request label Feb 1, 2024
@caarlos0 caarlos0 requested a review from aymanbagabas February 1, 2024 13:37
@caarlos0 caarlos0 self-assigned this Feb 1, 2024
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
caarlos0 added a commit to charmbracelet/ssh that referenced this pull request Feb 1, 2024
refs charmbracelet/x#35

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Copy link
Member

@aymanbagabas aymanbagabas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noice! Does this build on all BSDs? Should we support dragonfly? Would be nice to have a workflow to build for all these OSes

@caarlos0
Copy link
Member Author

caarlos0 commented Feb 1, 2024

Assuming dragonfly uses the same syscalls, its possible yeah.

agreed, wouldn't hurt to go build for all GOOS/GOARCH to see if it at least compiles.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
only on linux, on other OSs this will help by simply failing to compile

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@caarlos0
Copy link
Member Author

caarlos0 commented Feb 1, 2024

to limit the scope a bit: we usually release for these OS:

    goos:
      - linux
      - darwin
      - windows
      - freebsd
      - openbsd
      - netbsd
    goarch:
      - amd64
      - arm64
      - "386"
      - arm
    goarm:
      - "7"
    ignore:
      - goos: windows
        goarch: arm64
      - goos: windows
        goarm: "7"

so I gonna make it work for them primarly ⭐️

exp/term/termios/termios.go Outdated Show resolved Hide resolved
exp/term/termios/termios.go Outdated Show resolved Hide resolved
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@caarlos0 caarlos0 merged commit 7acb62e into main Feb 2, 2024
9 checks passed
@caarlos0 caarlos0 deleted the termios branch February 2, 2024 11:29
caarlos0 added a commit to charmbracelet/ssh that referenced this pull request Feb 2, 2024
* refactor: use new termios lib

refs charmbracelet/x#35

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: darwin

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* chore: update

* chore: update dep

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants