Rich Enhanced Shell History - Contextual shell history for zsh and bash
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
resh/scripts/reshctl.sh

33 lines
677 B

# source bindutil - contains functions to bind and unbind RESH widgets
# shellcheck source=bindutil.sh
. ~/.resh/bindutil.sh
reshctl() {
# run resh-control aka the real reshctl
resh-control "$@"
# modify current shell session based on exit status
local status=$?
case "$status" in
0|1)
# success | fail
return "$status"
;;
# enable
100)
# enable all
__resh_bind_all
return 0
;;
# disable
110)
# disable all
__resh_unbind_all
return 0
;;
*)
echo "reshctl() FATAL ERROR: unknown status" >&2
return "$status"
;;
esac
}