Return the warning for new installs, cosmetic fixes

pull/184/head
Simon Let 3 years ago
parent 9b0c8b3149
commit acbf463942
  1. 7
      scripts/hooks.sh
  2. 16
      scripts/install.sh

@ -21,9 +21,6 @@ __resh_reload_shellrc() {
# => The `__resh_preexec` function needs to exist in all future versions. # => The `__resh_preexec` function needs to exist in all future versions.
# => Make sure that `__RESH_NO_RELOAD` behavior is not broken in any future version. # => Make sure that `__RESH_NO_RELOAD` behavior is not broken in any future version.
# => Prefer only testing `__RESH_NO_RELOAD` for emptyness instead of specific value # => Prefer only testing `__RESH_NO_RELOAD` for emptyness instead of specific value
# Other:
# - Return status code of `resh-collect` and `resh-postcollect` commands from `__resh_preexec` and `__resh_precmd` respectively.
# - Even nested calls of `__resh_preexec` should propagate the status.
# (pre)collect # (pre)collect
@ -37,8 +34,8 @@ __resh_preexec() {
# Reload shell files and restart __resh_preexec - i.e. the full command will be recorded only with a slight delay. # Reload shell files and restart __resh_preexec - i.e. the full command will be recorded only with a slight delay.
# This should happens in every already open terminal after resh update. # This should happens in every already open terminal after resh update.
# If `$2` is non-empty we play it safe, don't reload, and leave it up to resh-collect to error because of `--required-version` option. # If for any reason the __RESH_VERSION is still wrong we don't reload again to prevent potentially infinite recursion.
# This behavior gives user and error instead of handling things silently and risking infinite recursion. # User will most likely see error because of `resh-collect -requiredVersion`.
__resh_reload_shellrc __resh_reload_shellrc
# Rerun self but prevent another reload. Extra protection against infinite recursion. # Rerun self but prevent another reload. Extra protection against infinite recursion.

@ -205,7 +205,13 @@ ISSUES & FEEDBACK
Please report issues to: https://github.com/curusarn/resh/issues Please report issues to: https://github.com/curusarn/resh/issues
Feedback and suggestions are very welcome! Feedback and suggestions are very welcome!
" "
if [ -z "${__RESH_VERSION:-}" ]; then info="$info
##############################################################
# #
# Finish the installation by RESTARTING this terminal! #
# #
##############################################################"
fi
info="$info info="$info
---- Close this by pressing Q ----" ---- Close this by pressing Q ----"
@ -216,3 +222,11 @@ echo "All done!"
echo "Thank you for using RESH" echo "Thank you for using RESH"
echo "Report issues here: https://github.com/curusarn/resh/issues" echo "Report issues here: https://github.com/curusarn/resh/issues"
echo "Ctrl+R launches the RESH SEARCH app" echo "Ctrl+R launches the RESH SEARCH app"
if [ -z "${__RESH_VERSION:-}" ]; then printf "
##############################################################
# #
# Finish the installation by RESTARTING this terminal! #
# #
##############################################################\n"
fi
Loading…
Cancel
Save