Fix shell startup.

This commit is contained in:
David Tomaschik
2026-02-27 16:12:42 -08:00
parent 92fb8cb47d
commit 7006974bb3
5 changed files with 156 additions and 53 deletions

View File

@@ -0,0 +1,14 @@
# This file was created by fish when upgrading to version 4.3, to migrate
# the 'fish_key_bindings' variable from its old default scope (universal)
# to its new default scope (global). We recommend you delete this file
# and configure key bindings in ~/.config/fish/config.fish if needed.
# set --global fish_key_bindings fish_default_key_bindings
# Prior to version 4.3, fish shipped an event handler that runs
# `set --universal fish_key_bindings fish_default_key_bindings`
# whenever the fish_key_bindings variable is erased.
# This means that as long as any fish < 4.3 is still running on this system,
# we cannot complete the migration.
# As a workaround, erase the universal variable at every shell startup.
set --erase --universal fish_key_bindings

View File

@@ -0,0 +1,48 @@
# This file was created by fish when upgrading to version 4.3, to migrate
# theme variables from universal to global scope.
# Don't edit this file, as it will be written by the web-config tool (`fish_config`).
# To customize your theme, delete this file and see
# help interactive#syntax-highlighting
# or
# man fish-interactive | less +/^SYNTAX.HIGHLIGHTING
# for appropriate commands to add to ~/.config/fish/config.fish instead.
# See also the release notes for fish 4.3.0 (run `help relnotes`).
set --global fish_color_autosuggestion 4D5566
set --global fish_color_cancel --reverse
set --global fish_color_command 39BAE6
set --global fish_color_comment 626A73
set --global fish_color_cwd 59C2FF
set --global fish_color_cwd_root red
set --global fish_color_end F29668
set --global fish_color_error FF3333
set --global fish_color_escape 95E6CB
set --global fish_color_history_current --bold
set --global fish_color_host normal
set --global fish_color_host_remote yellow
set --global fish_color_keyword 39BAE6
set --global fish_color_match F07178
set --global fish_color_normal B3B1AD
set --global fish_color_operator E6B450
set --global fish_color_option B3B1AD
set --global fish_color_param B3B1AD
set --global fish_color_quote C2D94C
set --global fish_color_redirection FFEE99
set --global fish_color_search_match --background=E6B450
set --global fish_color_selection --background=E6B450
set --global fish_color_status red
set --global fish_color_user brgreen
set --global fish_color_valid_path --underline
set --global fish_pager_color_background
set --global fish_pager_color_completion normal
set --global fish_pager_color_description B3A06D
set --global fish_pager_color_prefix normal --bold --underline
set --global fish_pager_color_progress brwhite --background=cyan
set --global fish_pager_color_secondary_background
set --global fish_pager_color_secondary_completion
set --global fish_pager_color_secondary_description
set --global fish_pager_color_secondary_prefix
set --global fish_pager_color_selected_background --background=E6B450
set --global fish_pager_color_selected_completion
set --global fish_pager_color_selected_description
set --global fish_pager_color_selected_prefix

View File

@@ -1,48 +1,9 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR EDITOR:vim
SETUVAR __fish_initialized:3800
SETUVAR __fish_initialized:4300
SETUVAR _fisher_jorgebucaran_2F_fisher_files:\x7e/\x2econfig/fish/functions/fisher\x2efish\x1e\x7e/\x2econfig/fish/completions/fisher\x2efish
SETUVAR _fisher_plugins:jorgebucaran/fisher\x1ewfxr/forgit
SETUVAR _fisher_upgraded_to_4_4:\x1d
SETUVAR _fisher_wfxr_2F_forgit_files:\x7e/\x2econfig/fish/conf\x2ed/bin\x1e\x7e/\x2econfig/fish/conf\x2ed/forgit\x2eplugin\x2efish\x1e\x7e/\x2econfig/fish/completions/_git\x2dforgit\x1e\x7e/\x2econfig/fish/completions/git\x2dforgit\x2ebash\x1e\x7e/\x2econfig/fish/completions/git\x2dforgit\x2efish
SETUVAR fish_color_autosuggestion:4D5566
SETUVAR fish_color_cancel:\x2d\x2dreverse
SETUVAR fish_color_command:39BAE6
SETUVAR fish_color_comment:626A73
SETUVAR fish_color_cwd:59C2FF
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:F29668
SETUVAR fish_color_error:FF3333
SETUVAR fish_color_escape:95E6CB
SETUVAR fish_color_history_current:\x2d\x2dbold
SETUVAR fish_color_host:normal
SETUVAR fish_color_host_remote:yellow
SETUVAR fish_color_keyword:39BAE6
SETUVAR fish_color_match:F07178
SETUVAR fish_color_normal:B3B1AD
SETUVAR fish_color_operator:E6B450
SETUVAR fish_color_option:B3B1AD
SETUVAR fish_color_param:B3B1AD
SETUVAR fish_color_quote:C2D94C
SETUVAR fish_color_redirection:FFEE99
SETUVAR fish_color_search_match:\x2d\x2dbackground\x3dE6B450
SETUVAR fish_color_selection:\x2d\x2dbackground\x3dE6B450
SETUVAR fish_color_status:red
SETUVAR fish_color_user:brgreen
SETUVAR fish_color_valid_path:\x2d\x2dunderline
SETUVAR fish_greeting:Welcome\x20to\x20fish\x2c\x20the\x20friendly\x20interactive\x20shell\x0aType\x20\x60help\x60\x20for\x20instructions\x20on\x20how\x20to\x20use\x20fish
SETUVAR fish_key_bindings:fish_default_key_bindings
SETUVAR fish_pager_color_background:\x1d
SETUVAR fish_pager_color_completion:normal
SETUVAR fish_pager_color_description:B3A06D
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_pager_color_secondary_background:\x1d
SETUVAR fish_pager_color_secondary_completion:\x1d
SETUVAR fish_pager_color_secondary_description:\x1d
SETUVAR fish_pager_color_secondary_prefix:\x1d
SETUVAR fish_pager_color_selected_background:\x2d\x2dbackground\x3dE6B450
SETUVAR fish_pager_color_selected_completion:\x1d
SETUVAR fish_pager_color_selected_description:\x1d
SETUVAR fish_pager_color_selected_prefix:\x1d

View File

@@ -1,5 +1,7 @@
#!/bin/sh
# Sourced by zshrc as well as bash.
# Should only use POSIX shell constructs.
# shellcheck shell=sh
umask 027
@@ -40,7 +42,7 @@ if [ -z "${BROWSER}" ] ; then
fi
# For virtualenvwrapper
export WORKON_HOME=$HOME/.virtualenvs
export WORKON_HOME="$HOME/.virtualenvs"
# GPG full key id
export GPG_ID=7FD58D9A196DCEEEAD671F94F4D7A7915DEA789B
@@ -118,18 +120,13 @@ unset _SSH_AUTH_LINK
# Setup XDG-like dirs on MacOS
# Based on https://leebyron.com/til/mac-xdg/
if [ "$(uname)" = "Darwin" ] ; then
original_options=$(echo "$-")
set -a
# Anything set here will be exported
: "${XDG_BIN_HOME:=$HOME/.local/bin}"
: "${XDG_CACHE_HOME:=$HOME/Library/Caches}"
: "${XDG_CONFIG_HOME:=$HOME/.config}"
: "${XDG_DATA_HOME:=$HOME/.local/share}"
: "${XDG_RUNTIME_DIR:=$TMPDIR/runtime-$UID}"
: "${XDG_STATE_HOME:=$HOME/.local/state}"
set -f # Temporarily disable globbing to handle options with special characters
set -- "-$original_options"
unset original_options
export XDG_BIN_HOME="${XDG_BIN_HOME:-$HOME/.local/bin}"
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/Library/Caches}"
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
# Using id -u for better POSIX compatibility than $UID
export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-$TMPDIR/runtime-$(id -u)}"
export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}"
fi
if test -e "$HOME/.localenv"; then