33-lazy-ssh-agent #46

Merged
Mr_Steppy merged 5 commits from 33-lazy-ssh-agent into master 2026-08-31 21:28:29 +02:00
5 changed files with 21 additions and 18 deletions
Showing only changes of commit a4d7fd7506 - Show all commits

View File

@ -1,10 +1,10 @@
[package] [package]
name = "multi-ssh" name = "multi-ssh"
version = "0.2.0" version = "0.2.0"
edition = "2021" edition = "2024"
[dependencies] [dependencies]
clap = { version = "4.5.23", features = ["derive"] } clap = { version = "4.6.6", features = ["derive"] }
lazy-regex = "3.3.0" lazy-regex = "3.6.1"
shell-words = "1.1.0" shell-words = "1.1.1"
homedir = "0.3.4" homedir = "0.3.6"

View File

@ -2,16 +2,16 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1759580034, "lastModified": 1787962033,
"narHash": "sha256-YWo57PL7mGZU7D4WeKFMiW4ex/O6ZolUS6UNBHTZfkI=", "narHash": "sha256-u6z9VTZA4Kf3RkHQo9sQI7NI4Ei/uiU9vrMqOiwWP1Y=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3bcc93c5f7a4b30335d31f21e2f1281cba68c318", "rev": "c5c4a43b0e8056328ec4529f735cabdb8f1942bb",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-25.05", "ref": "nixos-26.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -43,11 +43,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1759631821, "lastModified": 1788165049,
"narHash": "sha256-V8A1L0FaU/aSXZ1QNJScxC12uP4hANeRBgI4YdhHeRM=", "narHash": "sha256-en4IoUeCqvq9F66YhwOrUFw1nc70OBhrJwrzfalezvY=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "1d7cbdaad90f8a5255a89a6eddd8af24dc89cafe", "rev": "d03cd474bd97389dcc2e8cd3b3bb6b8c6e346b1a",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -2,7 +2,7 @@
description = "Flake of https://dev.stupstech.de/Mr_Steppy/multi-ssh"; description = "Flake of https://dev.stupstech.de/Mr_Steppy/multi-ssh";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
rust-overlay.url = "github:oxalica/rust-overlay"; rust-overlay.url = "github:oxalica/rust-overlay";
}; };

View File

@ -1,6 +1,6 @@
use crate::shell_interface::{ use crate::shell_interface::{CommandOutput, CommandResult, ExitStatus, ShellCommand,
build_command_from_shell_command, CommandOutput, CommandResult, ExitStatus, ShellCommand,
ShellInterface, StartError, ShellInterface, StartError,
build_command_from_shell_command,
}; };
use std::env::VarError; use std::env::VarError;
use std::ffi::{OsStr, OsString}; use std::ffi::{OsStr, OsString};
@ -60,8 +60,11 @@ impl Environment for Prod {
K: AsRef<OsStr>, K: AsRef<OsStr>,
V: AsRef<OsStr>, V: AsRef<OsStr>,
{ {
unsafe {
//multi-ssh is single threaded
env::set_var(key, value); env::set_var(key, value);
} }
}
fn get_home_directory(&self) -> Option<PathBuf> { fn get_home_directory(&self) -> Option<PathBuf> {
homedir::my_home().ok().flatten() homedir::my_home().ok().flatten()

View File

@ -70,7 +70,7 @@ pub enum ShellCommand {
} }
impl ShellCommand { impl ShellCommand {
pub fn in_env<E>(self, environment: &mut E) -> EnvCommand<E> { pub fn in_env<E>(self, environment: &mut E) -> EnvCommand<'_, E> {
EnvCommand { EnvCommand {
command: self, command: self,
environment, environment,