私はmacOSCatalina
とNixを使用しています2.3.12
。
bash
(Nix経由)最新バージョンにアップデート中です。正常にインストールでき、インストールされたNixのバージョンがロードされますが、Bash(最新バージョン)で機能を使用しようとすると、ソースコードを除いて5.x
は使用できません。これはNixのソースコードです。.bashrc
私のソース.bashrc
(.bash_profile
このコンテンツのみ):
#
# ~/.bash_profile
#
[ -f "${HOME}/.bashrc" ] && . "${HOME}/.bashrc"
この問題が発生する前に更新されたバージョンをロードする方法はありますか?
/etc/shells
ファイルを新しいbash
場所に更新して試してもchsh -s /Users/x80486/.nix-profile/bin/bash
機能しません。
.bashrc
私のファイルの内容は次のとおりです。
#
# ~/.bashrc
#
# If not running interactively, don't do anything
# -------------------------------------------------------------------------------------------------
[[ $- != *i* ]] && return
# Aliases
# -------------------------------------------------------------------------------------------------
[ -f "${HOME}/.bash_aliases" ] && . "${HOME}/.bash_aliases"
# Check the window size after each command and, if necessary, update the
# values of LINES and COLUMNS
# -------------------------------------------------------------------------------------------------
shopt -s checkwinsize
# Append to the history file, don't overwrite it
# -------------------------------------------------------------------------------------------------
shopt -s histappend
# Prompt customization
# -------------------------------------------------------------------------------------------------
PS1="\[$(tput sgr0)\][\[\033[01;32m\]\u@\h\[$(tput sgr0)\]:\[\033[01;34m\]\w\[$(tput sgr0)\]]$ "
# PS1="[\u@\h \W]$ "
export PS1
# Set default editor
# -------------------------------------------------------------------------------------------------
EDITOR=/usr/bin/nano
export EDITOR
# Set default blocksize for ls, df, du
# -------------------------------------------------------------------------------------------------
BLOCKSIZE=1k
export BLOCKSIZE
# Do not log repeated identical commands
# -------------------------------------------------------------------------------------------------
HISTCONTROL=ignoreboth:erasedups
export HISTCONTROL
# Increase/Set history limit (100 KB or 5000 entries)
# -------------------------------------------------------------------------------------------------
HISTFILESIZE=100000
export HISTFILESIZE
HISTSIZE=100
export HISTSIZE
# Erlang
# -------------------------------------------------------------------------------------------------
# export ERL_AFLAGS="+pc unicode -kernel shell_history enabled"
# Golang
# -------------------------------------------------------------------------------------------------
GOPATH="${HOME}/.cache/go-path"
export GOPATH
[ ! -d "${HOME}/.cache/go-path" ] && mkdir --parents "${HOME}/.cache/go-path"
PATH="${PATH}:${GOPATH}/bin"
# Nix Package Manager
# -------------------------------------------------------------------------------------------------
BASH_COMPLETION_COMPAT_DIR="${HOME}/.nix-profile/etc/bash_completion.d"
export BASH_COMPLETION_COMPAT_DIR
XDG_DATA_DIRS="${HOME}/.nix-profile/share:${XDG_DATA_DIRS}"
export XDG_DATA_DIRS
[ -f "${HOME}/.nix-profile/etc/profile.d/nix.sh" ] && . "${HOME}/.nix-profile/etc/profile.d/nix.sh"
[ -f "${HOME}/.nix-profile/etc/profile.d/bash_completion.sh" ] && . "${HOME}/.nix-profile/etc/profile.d/bash_completion.sh"
[ -f "${HOME}/.nix-profile/etc/bash_completion.d/git-completion.bash" ] && . "${HOME}/.nix-profile/etc/bash_completion.d/git-completion.bash"
[ -f "${HOME}/.nix-profile/share/bash-completion/completions/gradle" ] && . "${HOME}/.nix-profile/share/bash-completion/completions/gradle"
# Playground Area
# -------------------------------------------------------------------------------------------------
# ASDF
# -------------------------------------------------------------------------------------------------
[ -f "${HOME}/.asdf/asdf.sh" ] && . "${HOME}/.asdf/asdf.sh"
[ -f "${HOME}/.asdf/completions/asdf.bash" ] && . "${HOME}/.asdf/completions/asdf.bash"
export PATH