diff --git a/share/config.fish b/share/config.fish index b46cadaec..15eb899b8 100644 --- a/share/config.fish +++ b/share/config.fish @@ -16,7 +16,7 @@ function __fish_default_command_not_found_handler printf (_ "fish: Unknown command: %s\n") (string escape -- $argv[1]) >&2 end -if not status --is-interactive +if not status is-interactive # Hook up the default as the command_not_found handler # if we are not interactive to avoid custom handlers. function fish_command_not_found --on-event fish_command_not_found @@ -148,7 +148,7 @@ and __fish_set_locale # Some things should only be done for login terminals # This used to be in etc/config.fish - keep it here to keep the semantics # -if status --is-login +if status is-login if command -sq /usr/libexec/path_helper __fish_macos_set_env PATH /etc/paths '/etc/paths.d' if test -n "$MANPATH" diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish index 8c72bbb87..74ec1cf04 100644 --- a/share/functions/__fish_config_interactive.fish +++ b/share/functions/__fish_config_interactive.fish @@ -29,14 +29,14 @@ function __fish_config_interactive -d "Initializations that should be performed # The default just prints a variable of the same name. # # NOTE: This status check is necessary to not print the greeting when `read`ing in scripts. See #7080. - if status --is-interactive + if status is-interactive and functions -q fish_greeting fish_greeting end # Display SHELL_WELCOME if set. This is a standard environment variable (introduced by # systemd v257) intended for shells to display when they first initialize. - if status --is-interactive + if status is-interactive and set -q SHELL_WELCOME[1] string join -- ' ' $SHELL_WELCOME end diff --git a/share/functions/cd.fish b/share/functions/cd.fish index 32929d20d..be9f00683 100644 --- a/share/functions/cd.fish +++ b/share/functions/cd.fish @@ -14,7 +14,7 @@ function cd --description "Change directory" end # Skip history in subshells. - if status --is-command-substitution + if status is-command-substitution builtin cd $argv return $status end diff --git a/share/functions/fish_git_prompt.fish b/share/functions/fish_git_prompt.fish index 534a4df82..8b94b43b2 100644 --- a/share/functions/fish_git_prompt.fish +++ b/share/functions/fish_git_prompt.fish @@ -663,7 +663,7 @@ end function __fish_git_prompt_reset -a type -a op -a var --description "Event handler, resets prompt when functionality changes" \ --on-variable=__fish_git_prompt_{show_informative_status,use_informative_chars} - if status --is-interactive + if status is-interactive # Clear characters that have different defaults with/without informative status set -e ___fish_git_prompt_char_{name,cleanstate,dirtystate,invalidstate,stagedstate,stashstate,stateseparator,untrackedfiles,upstream_ahead,upstream_behind} # Clear init so we reset the chars next time. @@ -673,7 +673,7 @@ end function __fish_git_prompt_reset_color -a type -a op -a var --description "Event handler, resets prompt when any color changes" \ --on-variable=__fish_git_prompt_color{'',_prefix,_suffix,_bare,_merging,_cleanstate,_invalidstate,_upstream,_flags,_branch,_dirtystate,_stagedstate,_branch_detached,_stashstate,_untrackedfiles} --on-variable=__fish_git_prompt_showcolorhints - if status --is-interactive + if status is-interactive set -e _$var set -e _{$var}_done set -e ___fish_git_prompt_init @@ -686,7 +686,7 @@ end function __fish_git_prompt_reset_char -a type -a op -a var --description "Event handler, resets prompt when any char changes" \ --on-variable=__fish_git_prompt_char_{cleanstate,dirtystate,invalidstate,stagedstate,stashstate,stateseparator,untrackedfiles,upstream_ahead,upstream_behind,upstream_diverged,upstream_equal,upstream_prefix} - if status --is-interactive + if status is-interactive set -e ___fish_git_prompt_init set -e _$var end diff --git a/share/functions/psub.fish b/share/functions/psub.fish index 5062d7bb9..74d7ac197 100644 --- a/share/functions/psub.fish +++ b/share/functions/psub.fish @@ -13,7 +13,7 @@ function psub --description "Read from stdin into a file and output the filename set -l filename set -l funcname - if not status --is-command-substitution + if not status is-command-substitution { printf (_ "%s: Not inside of command substitution") psub echo