# ~/.bash_env # # Environment variables and default tool behavior. # This file should mostly contain exports, not aliases or functions. # ------------------------------------------------------------ # Locale # ------------------------------------------------------------ # Language and character encoding. # UTF-8 avoids many issues with Unicode filenames, symbols, and text. # # Change this to your real locale. # Examples: # en_US.UTF-8 # en_GB.UTF-8 # de_CH.UTF-8 export LANG="${LANG:-en_US.UTF-8}" # LC_ALL overrides all other locale categories. # # Many users avoid setting LC_ALL permanently unless they # specifically need it, because it can override more precise settings. # # Uncomment only if you know you want this: # export LC_ALL=en_US.UTF-8 # ------------------------------------------------------------ # Editors and pagers # ------------------------------------------------------------ # Default editor used by Git, crontab, sudoedit, etc. export EDITOR="${EDITOR:-vim}" # Visual editor, usually same as EDITOR. export VISUAL="${VISUAL:-$EDITOR}" # Default pager. export PAGER="${PAGER:-less}" # Options for less: # # -R: # Show ANSI color escape sequences correctly. # # -F: # Quit automatically if the content fits on one screen. # # -X: # Do not clear the screen when less exits. export LESS='-R -F -X' # Git pager. # Keeps colored output readable inside less. export GIT_PAGER="${GIT_PAGER:-less -R}" # Man-page pager. # less -R helps preserve formatting/color when supported. export MANPAGER="${MANPAGER:-less -R}" # ------------------------------------------------------------ # Tool-specific config # ------------------------------------------------------------ # ripgrep config file. # Only export it if the file exists, to avoid pointing tools at # a missing configuration file. if [ -f "$HOME/.ripgreprc" ]; then export RIPGREP_CONFIG_PATH="$HOME/.ripgreprc" fi # fzf default command. # This controls what files fzf shows by default. # # The simple version below uses find, which is available almost everywhere. # Many users replace this with fd if installed. export FZF_DEFAULT_COMMAND="${FZF_DEFAULT_COMMAND:-find . -type f}" # Default options for fzf. # --height: # Opens fzf in a partial-height interface. # # --reverse: # Shows the prompt at the top. # # --border: # Adds a border around the interface. export FZF_DEFAULT_OPTS="${FZF_DEFAULT_OPTS:---height 40% --reverse --border}" # ------------------------------------------------------------ # Development defaults # ------------------------------------------------------------ # Prevent Python from writing __pycache__ directories everywhere. # Some developers like this; others prefer the default behavior. # Uncomment if desired: # export PYTHONDONTWRITEBYTECODE=1 # Make Python output unbuffered. # Useful for logs and CLI tools, but not always necessary. # Uncomment if desired: # export PYTHONUNBUFFERED=1 # Rust Cargo binaries, only if Cargo is installed. if [ -d "$HOME/.cargo/bin" ]; then path_prepend "$HOME/.cargo/bin" fi