Bash-it / bash-it

A community Bash framework.
MIT License
14.28k stars 2.29k forks source link

[Bug]: bash: ALTERNATE_EDITOR: parameter not set #2123

Closed simonbcn closed 2 years ago

simonbcn commented 2 years ago

Expected behavior

No error

Current behavior

It shows this error every time I log in: "-bash: ALTERNATE_EDITOR: parameter not set"

Possible solution

No response

Context

No response

Steps to reproduce

Enter and it shows it

Bash-it version

Version type: stable Current tag: v3.0.1 Tag information: https://github.com/Bash-it/bash-it/releases/tag/v3.0.1 Compare to latest: https://github.com/Bash-it/bash-it/compare/v3.0.1...master

List of enabled plugins, themes and aliases

Plugin Enabled? Description alias-completion [ ] autojump [ ] Autojump configuration, see https://github.com/wting/autojump for more details aws [ ] AWS helper functions base [x] miscellaneous tools basher [ ] initializes basher, the shell package manager battery [ ] display info about your battery charge level blesh [ ] load ble.sh, the Bash line editor! boot2docker [ ] Helpers to get Docker setup correctly for boot2docker browser [ ] render commandline output in your browser chruby-auto [ ] load chruby + auto-switching (from /usr/local/share/chruby) chruby [ ] load chruby (from /usr/local/share/chruby) cht-sh [ ] Simplify curl cht.sh/<query> to cht.sh <query> cmd-returned-notify [ ] Alert (BEL) when process ends after a threshold of seconds colors [ ] direnv [ ] load direnv, if you are using it: https://direnv.net/ dirs [ ] directory stack navigation docker-compose [ ] Helper functions for using docker-compose docker-machine [ ] Helpers to get Docker setup correctly for docker-machine docker [ ] Helpers to more easily work with Docker edit-mode-emacs [ ] Enable emacs editing mode edit-mode-vi [ ] Enable vi editing mode explain [ ] mankier.com explain function to explain other commands extract [ ] one command to extract them all... fasd [ ] load fasd, if you are using it fzf [ ] load fzf, if you are using it gif [ ] video to gif, gif to WebM helper functions git-subrepo [ ] load git-subrepo if you are using it, and initialize completions git [ ] git helper functions gitstatus [ ] speeds up your life by using gitstatus for git status calculations. install from https://github.com/romkatv/gitstatus go [ ] go environment variables & path configuration goenv [ ] load goenv, if you are using it gradle [ ] Add a gw command to use gradle wrapper if present, else use system gradle hg [ ] hg helper functions history-eternal [ ] eternal bash history history-search [x] search history using the prefix already entered history-substring-search [x] search history using the substring already entered history [x] improve history handling with sane defaults hub [ ] load hub, if you are using it java [ ] Java and JAR helper functions javascript [ ] download jquery files into current project jekyll [ ] manage your jekyll site jenv [ ] load jenv, if you are using it jgitflow [ ] Maven jgitflow build helpers jump [ ] initialize jump (see https://github.com/gsamokovarov/jump). Add export JUMP_OPTS=("--bind=z") to change keybinding latex [ ] add MacTeX to PATH less-pretty-cat [x] pygmentize instead of cat to terminal if possible man [x] colorize man pages for better readability nginx [ ] manage your nginx service node [ ] Node.js helper functions nodenv [ ] load nodenv, if you are using it nvm [ ] node version manager configuration osx-timemachine [ ] OS X Time Machine functions osx [ ] osx-specific functions pack [ ] CNB pack cli aliases percol [ ] Search&Select history with percol pipsi [ ] load pipsi, if you are using it plenv [ ] plenv plugin for Perl postgres [ ] postgres helper functions powerline [ ] enables powerline daemon projects [ ] quickly navigate configured project paths proxy [ ] Proxy Tools pyenv [ ] load pyenv, if you are using it python [ ] alias "shttp" to SimpleHTTPServer rails [ ] Helper functions for Ruby on Rails rbenv [ ] load rbenv, if you are using it ruby [ ] ruby and rubygems specific functions and settings rvm [ ] load rvm, if you are using it sdkman [ ] Load Software Development Kit Manager ssh [ ] ssh helper functions sshagent [ ] sshagent helper functions subversion [ ] svn helper functions sudo [x] Toggle sudo at the beginning of the current or the previous command by hitting the ESC key twice textmate [ ] set textmate as a default editor thefuck [x] Initialization for fuck tmux [ ] make sure that tmux is launched in 256 color mode tmuxinator [ ] sources tmuxinator script if available todo [ ] Todo.txt integration virtualenv [ ] virtualenvwrapper and pyenv-virtualenvwrapper helper functions xterm [ ] automatically set your xterm title with host and location info z_autoenv [ ] source into environment when cding to directories zoxide [ ] zoxide is a smarter cd command for your shell.

Bash version

GNU bash, version 5.1.4(1)-release (aarch64-unknown-linux-gnu)

Operating system and version

Debian GNU/Linux 11 (bullseye)

bash-it doctor output

# How to get: bash-it doctor

Your ~/.bashrc

#!/usr/bin/env bash

# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac

# Path to the bash it configuration
export BASH_IT="/home/juan/.bash_it"

# Lock and Load a custom theme file.
# Leave empty to disable theming.
# location /.bash_it/themes/
export BASH_IT_THEME='bobby'

# (Advanced): Change this to the name of your remote repo if you
# cloned bash-it with a remote other than origin such as `bash-it`.
# export BASH_IT_REMOTE='bash-it'

# (Advanced): Change this to the name of the main development branch if
# you renamed it or if it was changed for some reason
# export BASH_IT_DEVELOPMENT_BRANCH='master'

# Your place for hosting Git repos. I use this for private repos.
export GIT_HOSTING='git@git.domain.com'

# Don't check mail when opening terminal.
unset MAILCHECK

# Change this to your console based IRC client of choice.
export IRC_CLIENT='irssi'

# Set this to the command you use for todo.txt-cli
export TODO="t"

# Set this to false to turn off version control status checking within the prompt for all themes
export SCM_CHECK=true
# Set to actual location of gitstatus directory if installed
#export SCM_GIT_GITSTATUS_DIR="$HOME/gitstatus"
# per default gitstatus uses 2 times as many threads as CPU cores, you can change this here if you must
#export GITSTATUS_NUM_THREADS=8

# Set Xterm/screen/Tmux title with only a short hostname.
# Uncomment this (or set SHORT_HOSTNAME to something else),
# Will otherwise fall back on $HOSTNAME.
#export SHORT_HOSTNAME=$(hostname -s)

# Set Xterm/screen/Tmux title with only a short username.
# Uncomment this (or set SHORT_USER to something else),
# Will otherwise fall back on $USER.
#export SHORT_USER=${USER:0:8}

# If your theme use command duration, uncomment this to
# enable display of last command duration.
#export BASH_IT_COMMAND_DURATION=true
# You can choose the minimum time in seconds before
# command duration is displayed.
#export COMMAND_DURATION_MIN_SECONDS=1

# Set Xterm/screen/Tmux title with shortened command and directory.
# Uncomment this to set.
#export SHORT_TERM_LINE=true

# Set vcprompt executable path for scm advance info in prompt (demula theme)
# https://github.com/djl/vcprompt
#export VCPROMPT_EXECUTABLE=~/.vcprompt/bin/vcprompt

# (Advanced): Uncomment this to make Bash-it reload itself automatically
# after enabling or disabling aliases, plugins, and completions.
# export BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE=1

# Uncomment this to make Bash-it create alias reload.
# export BASH_IT_RELOAD_LEGACY=1

# Load Bash It
source "$BASH_IT"/bash_it.sh

Notes

No response

NoahGorny commented 2 years ago

Hi @simonbcn, I have created a PR that should fix this, can you try it out and see if it resolves your problems?

simonbcn commented 2 years ago

I have upgraded to the dev version and the error still occurs.

boldandbusted commented 2 years ago

Got bit by this too on stable. If I can help, let me know. But, meanwhile, is there a workaround? I tried in ~/.bash_profile: export ALTERNATE_EDITOR="vi"

but new shells still show it. :(

NoahGorny commented 2 years ago

Hi @simonbcn @boldandbusted , can you update to the latest dev version and try again to see if its resolved? use bash-it update dev

simonbcn commented 2 years ago

It works now. :+1:

boldandbusted commented 2 years ago

Sorry for the late reply - it works on stable now! :) Thank you! :)

❯ bash-it version
Version type: stable
Current tag: v3.0.2
Tag information: https://github.com/Bash-it/bash-it/releases/tag/v3.0.2
Compare to latest: https://github.com/Bash-it/bash-it/compare/v3.0.2...master