mirror of
https://github.com/nushell/nushell
synced 2024-11-16 01:37:57 +00:00
change name to command_prompt (#4003)
This commit is contained in:
parent
cc5c4d38bb
commit
fda69354db
1 changed files with 3 additions and 3 deletions
|
@ -33,7 +33,7 @@ use std::path::PathBuf;
|
|||
|
||||
// Name of environment variable where the prompt could be stored
|
||||
#[cfg(feature = "rustyline-support")]
|
||||
const PROMPT_STRING: &str = "PROMPT_STRING";
|
||||
const PROMPT_COMMAND: &str = "PROMPT_COMMAND";
|
||||
|
||||
pub fn search_paths() -> Vec<std::path::PathBuf> {
|
||||
use std::env;
|
||||
|
@ -301,9 +301,9 @@ pub fn cli(
|
|||
|
||||
let cwd = context.shell_manager().path();
|
||||
|
||||
// Check if the PROMPT_STRING env variable is set. This env variable
|
||||
// Check if the PROMPT_COMMAND env variable is set. This env variable
|
||||
// contains nu code that is used to overwrite the prompt
|
||||
let colored_prompt = match context.scope.get_env(PROMPT_STRING) {
|
||||
let colored_prompt = match context.scope.get_env(PROMPT_COMMAND) {
|
||||
Some(env_prompt) => evaluate_prompt_string(&env_prompt, &context, &cwd),
|
||||
None => {
|
||||
if let Some(prompt) = &prompt {
|
||||
|
|
Loading…
Reference in a new issue