Skip to content

Commit

Permalink
Shell: removed bash support
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-matsui committed Nov 27, 2024
1 parent 6dd5d94 commit e0d49d0
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 81 deletions.
59 changes: 0 additions & 59 deletions .bash_profile

This file was deleted.

8 changes: 0 additions & 8 deletions .bashrc

This file was deleted.

7 changes: 0 additions & 7 deletions .config/shell/handlers.bash

This file was deleted.

63 changes: 58 additions & 5 deletions .zshenv
Original file line number Diff line number Diff line change
@@ -1,10 +1,40 @@
if [ -f "$HOME/.bash_profile" ]; then
source "$HOME/.bash_profile"
else
echo "Error: $HOME/.zshenv: $HOME/.bash_profile is required" >&2
return 1
#
# Environment Variables
#

export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"

export SHELL_CONFIG_HOME="$XDG_CONFIG_HOME/shell"
export SHELL_NAME="${SHELL##*/}"
export OS_NAME="$(uname -s)"

#
# Browser
#

if [ "$OS_NAME" = Darwin ]; then
export BROWSER='open'
fi

#
# Editors
#

export EDITOR='nvim'
export VISUAL=$EDITOR
export PAGER='less'

#
# Locale
#

export LANG="${LANG:-en_US.UTF-8}"
export LANGUAGE="${LANGUAGE:-en_US}"
export LC_ALL="${LC_ALL:-$LANG}"
export TZ='America/New_York'

#
# Paths
#
Expand All @@ -27,8 +57,31 @@ path=(
# Less
#

# Set the default Less options.
# Mouse-wheel scrolling has been disabled by -X (disable screen clearing).
# Remove -X and -F (exit if the content fits on one screen) to enable it.
export LESS='-F -g -i -M -R -S -w -X -z-4'

# Set the Less input preprocessor.
# Try both `lesspipe` and `lesspipe.sh` as either might exist on a system.
if (( $#commands[(i)lesspipe(|.sh)] )); then
export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-"
fi

#
# Homebrew
#

if [ -f /opt/homebrew/bin/brew ]; then
# M1
eval "$(/opt/homebrew/bin/brew shellenv)"
elif [ -f /home/linuxbrew/.linuxbrew/bin/brew ]; then
# Linux
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
elif [ -f ~/homebrew/bin/brew ]; then
# Home directory installation
eval "$(~/homebrew/bin/brew shellenv)"
fi
if command -v brew >/dev/null 2>&1; then
export HOMEBREW_PREFIX="$(brew --prefix)"
fi
2 changes: 0 additions & 2 deletions setup/common/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,5 @@ backup_and_link .config/waybar
backup_and_link .config/starship.toml
backup_and_link .ssh
backup_and_link .Brewfile
backup_and_link .bash_profile
backup_and_link .bashrc
backup_and_link .zshenv
backup_and_link .zshrc

0 comments on commit e0d49d0

Please sign in to comment.