pull/177/merge
Bryan Dady 3 years ago committed by GitHub
commit e98e81a74b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 27
      scripts/install.sh

@ -31,7 +31,7 @@ if [ "$bash_too_old" = true ]; then
if [ "$login_shell" = bash ]; then if [ "$login_shell" = bash ]; then
echo " > Your bash version is old." echo " > Your bash version is old."
echo " > Bash is also your login shell." echo " > Bash is also your login shell."
echo " > Updating to bash 4.3+ is strongly RECOMMENDED!" echo " > Updating to bash 4.3+ is STRONGLY RECOMMENDED!"
else else
echo " > Your bash version is old" echo " > Your bash version is old"
echo " > Bash is not your login shell so it should not be an issue." echo " > Bash is not your login shell so it should not be an issue."
@ -52,7 +52,7 @@ else
if [ "$login_shell" = zsh ]; then if [ "$login_shell" = zsh ]; then
echo " > Your zsh version is old." echo " > Your zsh version is old."
echo " > Zsh is also your login shell." echo " > Zsh is also your login shell."
echo " > Updating to Zsh 5.0+ is strongly RECOMMENDED!" echo " > Updating to Zsh 5.0+ is STRONGLY RECOMMENDED!"
else else
echo " > Your zsh version is old" echo " > Your zsh version is old"
echo " > Zsh is not your login shell so it should not be an issue." echo " > Zsh is not your login shell so it should not be an issue."
@ -133,10 +133,6 @@ update_config() {
if [ ! -f ~/.config/resh.toml ]; then if [ ! -f ~/.config/resh.toml ]; then
echo "Copying config file ..." echo "Copying config file ..."
cp -f conf/config.toml ~/.config/resh.toml cp -f conf/config.toml ~/.config/resh.toml
# else
# echo "Merging config files ..."
# NOTE: This is where we will merge configs when we make changes to the upstream config
# HINT: check which version are we updating FROM and make changes to config based on that
fi fi
echo "Generating completions ..." echo "Generating completions ..."
@ -158,14 +154,14 @@ if [ ! -f ~/.bashrc ]; then
touch ~/.bashrc touch ~/.bashrc
fi fi
grep -q '[[ -f ~/.resh/shellrc ]] && source ~/.resh/shellrc' ~/.bashrc ||\ grep -q '[[ -f ~/.resh/shellrc ]] && source ~/.resh/shellrc' ~/.bashrc ||\
echo -e '\n[[ -f ~/.resh/shellrc ]] && source ~/.resh/shellrc # this line was added by RESH (Rich Enchanced Shell History)' >> ~/.bashrc echo -e '\n[[ -f ~/.resh/shellrc ]] && source ~/.resh/shellrc # this line was added by RESH (Rich Enhanced Shell History)' >> ~/.bashrc
# Adding bash-preexec to .bashrc ... # Adding bash-preexec to .bashrc ...
grep -q '[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh' ~/.bashrc ||\ grep -q '[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh' ~/.bashrc ||\
echo -e '\n[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh # this line was added by RESH (Rich Enchanced Shell History)' >> ~/.bashrc echo -e '\n[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh # this line was added by RESH (Rich Enhanced Shell History)' >> ~/.bashrc
# Adding resh shellrc to .zshrc ... # Adding resh shellrc to .zshrc ...
if [ -f ~/.zshrc ]; then if [ -f ~/.zshrc ]; then
grep -q '[ -f ~/.resh/shellrc ] && source ~/.resh/shellrc' ~/.zshrc ||\ grep -q '[ -f ~/.resh/shellrc ] && source ~/.resh/shellrc' ~/.zshrc ||\
echo -e '\n[ -f ~/.resh/shellrc ] && source ~/.resh/shellrc # this line was added by RESH (Rich Enchanced Shell History)' >> ~/.zshrc echo -e '\n[ -f ~/.resh/shellrc ] && source ~/.resh/shellrc # this line was added by RESH (Rich Enhanced Shell History)' >> ~/.zshrc
fi fi
# Deleting zsh completion cache - for future use # Deleting zsh completion cache - for future use
@ -215,8 +211,8 @@ RESH SEARCH APPLICATION = Redesigned reverse search that actually works
Search your history by commands. Search your history by commands.
Host, directories, git remote, and exit status is used to display relevant results first. Host, directories, git remote, and exit status is used to display relevant results first.
At first, the search application will use the standard shell history without context. At first, the search results will include standard shell history without context.
All history recorded from now on will have context which will by the RESH SEARCH app. From now on, commands in shell history will have additional context added and used by the RESH SEARCH app.
Enable/disable Ctrl+R binding using reshctl command: Enable/disable Ctrl+R binding using reshctl command:
$ reshctl enable ctrl_r_binding $ reshctl enable ctrl_r_binding
@ -227,9 +223,12 @@ CHECK FOR UPDATES
$ reshctl update $ reshctl update
HISTORY HISTORY
Your resh history will be recorded to '~/.resh_history.json' Your shell history will now be recorded to '~/.resh_history.json'
Look at it using e.g. following command (you might need to install jq) You can (re)view it in a JSON enabled editor, or with the 'jq' command, for example:
$ tail -f ~/.resh_history.json | jq
$ tail -f ~/.resh_history.json | jq
For more info on the jq command, see https://stedolan.github.io/jq/download/
ISSUES & FEEDBACK ISSUES & FEEDBACK
Please report issues to: https://github.com/curusarn/resh/issues Please report issues to: https://github.com/curusarn/resh/issues

Loading…
Cancel
Save