2016-02-23 22:17:22 -03:00
|
|
|
function refresh -d "(deprecated) Refresh fish session by replacing current process"
|
|
|
|
echo (status -t)[5] | read -la caller
|
|
|
|
printf 'warning: function %srefresh%s is deprecated and will be removed soon.\n' \
|
|
|
|
(set_color -u) (set_color normal)
|
|
|
|
|
|
|
|
contains input $caller
|
|
|
|
or echo $caller
|
|
|
|
|
|
|
|
set -q CI
|
|
|
|
and return 0
|
|
|
|
|
2017-02-12 23:02:42 -06:00
|
|
|
type -q omf.reload
|
|
|
|
and omf.reload
|
2016-02-23 22:17:22 -03:00
|
|
|
|
2017-02-12 23:02:42 -06:00
|
|
|
# If omf.reload exist, current fish will be replaced via exec, so
|
2016-02-23 22:17:22 -03:00
|
|
|
# the code below will never be reached. When it doesn't exist, the code
|
|
|
|
# below, the deprecated method, will be used as fallback.
|
|
|
|
|
|
|
|
history --save
|
|
|
|
exec fish
|
|
|
|
end
|