Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kubie for openSUSE:Factory checked in at 2024-09-16 17:42:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kubie (Old) and /work/SRC/openSUSE:Factory/.kubie.new.29891 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kubie" Mon Sep 16 17:42:01 2024 rev:22 rq:1201163 version:0.24.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kubie/kubie.changes 2024-07-08 19:09:15.536931523 +0200 +++ /work/SRC/openSUSE:Factory/.kubie.new.29891/kubie.changes 2024-09-16 17:43:01.452929046 +0200 @@ -1,0 +2,11 @@ +Sat Sep 14 15:03:26 UTC 2024 - [email protected] + +- Update to version 0.24.0: + * Version 0.24.0 + * add partial namespace matching (#245) + * Bump the all group across 1 directory with 4 updates (#266) + * feature #263: add default editor settings (#264) + * Bump the all group across 1 directory with 6 updates (#262) + * order contexts alphabetically in kubie exec (#246) + +------------------------------------------------------------------- Old: ---- kubie-0.23.1.tar.gz New: ---- kubie-0.24.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kubie.spec ++++++ --- /var/tmp/diff_new_pack.J3XPQL/_old 2024-09-16 17:43:03.329006597 +0200 +++ /var/tmp/diff_new_pack.J3XPQL/_new 2024-09-16 17:43:03.345007258 +0200 @@ -19,7 +19,7 @@ %global rustflags '-Clink-arg=-Wl,-z,relro,-z,now' Name: kubie -Version: 0.23.1 +Version: 0.24.0 Release: 0 Summary: A Kubernetes context switcher License: Zlib ++++++ _service ++++++ --- /var/tmp/diff_new_pack.J3XPQL/_old 2024-09-16 17:43:03.649019824 +0200 +++ /var/tmp/diff_new_pack.J3XPQL/_new 2024-09-16 17:43:03.673020817 +0200 @@ -5,7 +5,7 @@ <param name="exclude">.git</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v(.*)</param> - <param name="revision">v0.23.1</param> + <param name="revision">v0.24.0</param> <param name="changesgenerate">enable</param> </service> <service name="recompress" mode="manual"> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.J3XPQL/_old 2024-09-16 17:43:03.881029415 +0200 +++ /var/tmp/diff_new_pack.J3XPQL/_new 2024-09-16 17:43:03.937031730 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/sbstp/kubie</param> - <param name="changesrevision">8cedc39eb2802c8315d9c4cc0f41c4abac122dce</param></service></servicedata> + <param name="changesrevision">c08d1a56c5f60890d2cd5d8d1b9e83626ffffb5c</param></service></servicedata> (No newline at EOF) ++++++ kubie-0.23.1.tar.gz -> kubie-0.24.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kubie-0.23.1/Cargo.lock new/kubie-0.24.0/Cargo.lock --- old/kubie-0.23.1/Cargo.lock 2024-07-01 02:26:04.000000000 +0200 +++ new/kubie-0.24.0/Cargo.lock 2024-09-12 01:36:06.000000000 +0200 @@ -49,9 +49,9 @@ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" @@ -83,9 +83,9 @@ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "10f00e1f6e58a40e807377c75c6a7f97bf9044fab57816f2414e6f5f4499d7b8" [[package]] name = "arrayvec" @@ -185,7 +185,7 @@ "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -206,9 +206,9 @@ [[package]] name = "clap" -version = "4.5.8" +version = "4.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b3edb18336f4df585bc9aa31dd99c036dfa5dc5e9a2939a722a188f3a8970d" +checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" dependencies = [ "clap_builder", "clap_derive", @@ -216,9 +216,9 @@ [[package]] name = "clap_builder" -version = "4.5.8" +version = "4.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1c09dd5ada6c6c78075d6fd0da3f90d8080651e2d6cc8eb2f1aaa4034ced708" +checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" dependencies = [ "anstream", "anstyle", @@ -228,9 +228,9 @@ [[package]] name = "clap_derive" -version = "4.5.8" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ "heck", "proc-macro2", @@ -704,12 +704,12 @@ [[package]] name = "kubie" -version = "0.23.1" +version = "0.24.0" dependencies = [ "anyhow", "attohttpc", "cfg-if", - "clap 4.5.8", + "clap 4.5.17", "dirs", "fs2", "glob", @@ -733,9 +733,9 @@ [[package]] name = "libc" -version = "0.2.155" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libredox" @@ -1071,18 +1071,18 @@ [[package]] name = "serde" -version = "1.0.203" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", @@ -1091,11 +1091,12 @@ [[package]] name = "serde_json" -version = "1.0.119" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8eddb61f0697cc3989c5d64b452f5488e2b8a60fd7d5076a3045076ffef8cb0" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -1215,14 +1216,15 @@ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1477,9 +1479,9 @@ [[package]] name = "which" -version = "6.0.1" +version = "6.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8211e4f58a2b2805adfbefbc07bab82958fc91e3836339b1ab7ae32465dce0d7" +checksum = "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f" dependencies = [ "either", "home", @@ -1530,7 +1532,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -1548,7 +1550,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -1568,18 +1579,18 @@ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -1590,9 +1601,9 @@ [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -1602,9 +1613,9 @@ [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -1614,15 +1625,15 @@ [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -1632,9 +1643,9 @@ [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -1644,9 +1655,9 @@ [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -1656,9 +1667,9 @@ [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -1668,9 +1679,9 @@ [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winsafe" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kubie-0.23.1/Cargo.toml new/kubie-0.24.0/Cargo.toml --- old/kubie-0.23.1/Cargo.toml 2024-07-01 02:26:04.000000000 +0200 +++ new/kubie-0.24.0/Cargo.toml 2024-09-12 01:36:06.000000000 +0200 @@ -11,11 +11,11 @@ name = "kubie" readme = "README.md" repository = "https://github.com/sbstp/kubie" -version = "0.23.1" +version = "0.24.0" [dependencies] anyhow = "1" -clap = { version = "4.5.8", features = ["derive"] } +clap = { version = "4.5.17", features = ["derive"] } cfg-if = "1" dirs = "5" fs2 = "0.4" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kubie-0.23.1/README.md new/kubie-0.24.0/README.md --- old/kubie-0.23.1/README.md 2024-07-01 02:26:04.000000000 +0200 +++ new/kubie-0.24.0/README.md 2024-09-12 01:36:06.000000000 +0200 @@ -103,6 +103,11 @@ # Default: unset shell: bash +# For the commands `kubie edit/edit-config` +# Possible values: Any installed text editor +# Default: unset +default_editor: vim + # Configure where to look for kubernetes config files. configs: @@ -148,8 +153,15 @@ # Behavior behavior: - # Make sure the namespace exists with `kubectl get namespaces` when switching - # namespaces. If you do not have the right to list namespaces, disable this. + # Namespace validation and switching behavior. Set to "false" if you do not have + # the right to list namespaces. + # Valid values: + # true: Make sure the namespace exists with `kubectl get namespaces`. + # false: Switch namespaces without validation. + # partial: Check for partial matches when running `kubie ns <namespace>` + # and no exact match is found: + # - if exactly one namespace partially matches, switch to that namespace + # - if multiple namespaces partially match, select from those # Default: true validate_namespaces: true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kubie-0.23.1/src/cmd/context.rs new/kubie-0.24.0/src/cmd/context.rs --- old/kubie-0.23.1/src/cmd/context.rs 2024-07-01 02:26:04.000000000 +0200 +++ new/kubie-0.24.0/src/cmd/context.rs 2024-09-12 01:36:06.000000000 +0200 @@ -37,7 +37,7 @@ kubeconfig.contexts[0].context.namespace.as_deref(), ); - if settings.behavior.validate_namespaces { + if settings.behavior.validate_namespaces.can_list_namespaces() { if let Some(namespace_name) = namespace_name { let namespaces = kubectl::get_namespaces(Some(&kubeconfig))?; if !namespaces.iter().any(|x| x == namespace_name) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kubie-0.23.1/src/cmd/edit.rs new/kubie-0.24.0/src/cmd/edit.rs --- old/kubie-0.23.1/src/cmd/edit.rs 2024-07-01 02:26:04.000000000 +0200 +++ new/kubie-0.24.0/src/cmd/edit.rs 2024-09-12 01:36:06.000000000 +0200 @@ -10,12 +10,18 @@ use crate::kubeconfig; use crate::settings::Settings; -fn get_editor() -> Result<PathBuf> { +fn get_editor(settings: &Settings) -> Result<PathBuf> { + if let Some(default_editor) = &settings.default_editor { + if let Ok(path) = which(default_editor) { + return Ok(path); + } + } + env::var("EDITOR") .ok() .and_then(|editor| which(editor).ok()) .or_else(|| { - for editor in &["vim", "emacs", "vi", "nano"] { + for editor in &["nvim", "vim", "emacs", "vi", "nano"] { if let Ok(path) = which(editor) { return Some(path); } @@ -41,7 +47,7 @@ .find_context_by_name(&context_name) .ok_or_else(|| anyhow!("Could not find context {}", context_name))?; - let editor = get_editor()?; + let editor = get_editor(settings)?; let mut job = Command::new(editor).arg(context_src.source.as_ref()).spawn()?; job.wait()?; @@ -49,8 +55,8 @@ Ok(()) } -pub fn edit_config() -> Result<()> { - let editor = get_editor()?; +pub fn edit_config(settings: &Settings) -> Result<()> { + let editor = get_editor(settings)?; let settings_path = Settings::path(); let mut job = Command::new(editor).arg(settings_path).spawn()?; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kubie-0.23.1/src/cmd/exec.rs new/kubie-0.24.0/src/cmd/exec.rs --- old/kubie-0.23.1/src/cmd/exec.rs 2024-07-01 02:26:04.000000000 +0200 +++ new/kubie-0.24.0/src/cmd/exec.rs 2024-09-12 01:36:06.000000000 +0200 @@ -58,7 +58,8 @@ } let installed = kubeconfig::get_installed_contexts(settings)?; - let matching = installed.get_contexts_matching(&context_name); + let mut matching = installed.get_contexts_matching(&context_name); + matching.sort_by(|a, b| a.item.name.cmp(&b.item.name)); if matching.is_empty() { return Err(anyhow!("No context matching {}", context_name)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kubie-0.23.1/src/cmd/mod.rs new/kubie-0.24.0/src/cmd/mod.rs --- old/kubie-0.23.1/src/cmd/mod.rs 2024-07-01 02:26:04.000000000 +0200 +++ new/kubie-0.24.0/src/cmd/mod.rs 2024-09-12 01:36:06.000000000 +0200 @@ -59,8 +59,9 @@ } } -pub fn select_or_list_namespace(skim_options: &SkimOptions) -> Result<SelectResult> { - let mut namespaces = kubectl::get_namespaces(None)?; +pub fn select_or_list_namespace(skim_options: &SkimOptions, namespaces: Option<Vec<String>>) -> Result<SelectResult> { + let mut namespaces = namespaces.unwrap_or_else(|| kubectl::get_namespaces(None).expect("could not get namespaces")); + namespaces.sort(); if namespaces.is_empty() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kubie-0.23.1/src/cmd/namespace.rs new/kubie-0.24.0/src/cmd/namespace.rs --- old/kubie-0.23.1/src/cmd/namespace.rs 2024-07-01 02:26:04.000000000 +0200 +++ new/kubie-0.24.0/src/cmd/namespace.rs 2024-09-12 01:36:06.000000000 +0200 @@ -5,7 +5,7 @@ use crate::kubeconfig; use crate::kubectl; use crate::session::Session; -use crate::settings::Settings; +use crate::settings::{Settings, ValidateNamespacesBehavior}; use crate::shell::spawn_shell; use crate::state::State; use crate::vars; @@ -32,16 +32,34 @@ .context("There is not previous namespace to switch to")? .to_string(), ), - Some(s) => { - if settings.behavior.validate_namespaces { + Some(s) => match settings.behavior.validate_namespaces { + ValidateNamespacesBehavior::False => Some(s), + ValidateNamespacesBehavior::True => { let namespaces = kubectl::get_namespaces(None)?; if !namespaces.contains(&s) { - return Err(anyhow!("'{}' is not a valid namespace for the context", s)) + return Err(anyhow!("'{}' is not a valid namespace for the context", s)); } + Some(s) } - Some(s) - } - None => match select_or_list_namespace(skim_options)? { + ValidateNamespacesBehavior::Partial => { + let namespaces = kubectl::get_namespaces(None)?; + if namespaces.contains(&s) { + Some(s) + } else { + let ns_partial_matches: Vec<String> = + namespaces.iter().filter(|&ns| ns.contains(&s)).cloned().collect(); + match ns_partial_matches.len() { + 0 => return Err(anyhow!("'{}' is not a valid namespace for the context", s)), + 1 => Some(ns_partial_matches[0].clone()), + _ => match select_or_list_namespace(skim_options, Some(ns_partial_matches))? { + SelectResult::Selected(s) => Some(s), + _ => return Ok(()), + }, + } + } + } + }, + None => match select_or_list_namespace(skim_options, None)? { SelectResult::Selected(s) => Some(s), _ => return Ok(()), }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kubie-0.23.1/src/main.rs new/kubie-0.24.0/src/main.rs --- old/kubie-0.23.1/src/main.rs 2024-07-01 02:26:04.000000000 +0200 +++ new/kubie-0.24.0/src/main.rs 2024-09-12 01:36:06.000000000 +0200 @@ -69,7 +69,7 @@ cmd::edit::edit_context(&settings, &skim_options, context_name)?; } Kubie::EditConfig => { - cmd::edit::edit_config()?; + cmd::edit::edit_config(&settings)?; } #[cfg(feature = "update")] Kubie::Update => { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kubie-0.23.1/src/settings.rs new/kubie-0.24.0/src/settings.rs --- old/kubie-0.23.1/src/settings.rs 2024-07-01 02:26:04.000000000 +0200 +++ new/kubie-0.24.0/src/settings.rs 2024-09-12 01:36:06.000000000 +0200 @@ -34,6 +34,8 @@ #[serde(default)] pub shell: Option<String>, #[serde(default)] + pub default_editor: Option<String>, + #[serde(default)] pub configs: Configs, #[serde(default)] pub prompt: Prompt, @@ -166,19 +168,28 @@ } } -#[derive(Debug, Deserialize)] +#[derive(Debug, Deserialize, Default)] pub struct Behavior { - #[serde(default = "def_bool_true")] - pub validate_namespaces: bool, + #[serde(default)] + pub validate_namespaces: ValidateNamespacesBehavior, #[serde(default)] pub print_context_in_exec: ContextHeaderBehavior, } -impl Default for Behavior { - fn default() -> Self { - Behavior { - validate_namespaces: true, - print_context_in_exec: Default::default(), +#[derive(Debug, Deserialize, Default)] +#[serde(rename_all = "lowercase")] +pub enum ValidateNamespacesBehavior { + #[default] + True, + False, + Partial, +} + +impl ValidateNamespacesBehavior { + pub fn can_list_namespaces(&self) -> bool { + match self { + ValidateNamespacesBehavior::True | ValidateNamespacesBehavior::Partial => true, + ValidateNamespacesBehavior::False => false, } } } ++++++ vendor.tar.xz ++++++ /work/SRC/openSUSE:Factory/kubie/vendor.tar.xz /work/SRC/openSUSE:Factory/.kubie.new.29891/vendor.tar.xz differ: char 15, line 1
