Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/cli/opts.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::{
cli::complete::complete_project_id,
data::{
project_id::{ProjectId, ProjectIdParseError},
renku_url::RenkuUrl,
Expand All @@ -9,6 +10,7 @@ use crate::{

use super::cmd::*;
use clap::{Parser, ValueEnum, ValueHint};
use clap_complete::ArgValueCompleter;
use clap_verbosity_flag::{Verbosity, WarnLevel};
use serde::{Deserialize, Serialize};
use snafu::{ResultExt, Snafu};
Expand Down Expand Up @@ -41,7 +43,7 @@ pub struct CommonOpts {
/// present commands can use it to confine there functionality to
/// this project. The value may be the project id (ulid) or the
/// path like <username>/<project-name>.
#[arg(long, value_hint = ValueHint::Url)]
#[arg(long, value_hint=ValueHint::Other,add = ArgValueCompleter::new(complete_project_id))]
pub project_context: Option<ProjectId>,

/// Set a proxy to use for doing http requests. By default, the
Expand Down
3 changes: 3 additions & 0 deletions src/httpclient/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ pub enum SessionMode {
Interactive,
#[serde(rename = "non-interactive")]
NonInteractive,
#[serde(rename = "app")]
App,
}

impl fmt::Display for SessionMode {
Expand All @@ -57,6 +59,7 @@ impl SessionMode {
match self {
SessionMode::Interactive => "interactive",
SessionMode::NonInteractive => "non-interactive",
SessionMode::App => "app",
}
}
}
Expand Down
Loading