fix: Suppress console output during zsh initialization to avoid P10K instant prompt warnings
- Add output redirection (&>/dev/null) when sourcing helper functions - Wrap export -f statements to suppress stderr during loading - This prevents P10K from detecting console output during initialization
This commit is contained in:
2 files changed
+6
-2
No files matched your search
@@ -271,6 +271,9 @@ oc_logout() {
|
||||
echo -e "${GREEN}✓ Logged out${NC}"
|
||||
}
|
||||
|
||||
# Export functions for use in subshells (mainly for bash compatibility)
|
||||
# Suppress output to avoid console noise during zsh initialization
|
||||
{
|
||||
export -f is_oc_logged_in
|
||||
export -f is_oc_token_valid
|
||||
export -f get_token_expiry_info
|
||||
@@ -280,4 +283,5 @@ export -f _oc_verify_project
|
||||
export -f oc_status
|
||||
export -f oc_contexts
|
||||
export -f oc_logout
|
||||
} 2>/dev/null
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
# Source this after .bash_aliases to override the old context-only aliases
|
||||
# ============================================================================
|
||||
|
||||
# First, source the helper functions
|
||||
source ~/.bash_oc_smart.sh
|
||||
# First, source the helper functions (suppress all console output during init)
|
||||
source ~/.bash_oc_smart.sh &>/dev/null
|
||||
|
||||
# ============================================================================
|
||||
# AWS Shared Clusters - Smart Switch Aliases
|
||||
|
||||
Reference in new issue
Block a user