Commit 8de7eb4c authored by Justin Hileman's avatar Justin Hileman

Merge pull request #276 from oh-my-fish/deprecate-refresh

lib: deprecate `refresh` function
parents e04ba4f3 b490fad3
# SYNOPSIS
# refresh
#
# OVERVIEW
# Refresh (reload) the current fish session.
function refresh -d "Refresh fish session by replacing current process"
if not set -q CI
history --save
exec fish < /dev/tty
end
end
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
type -q omf.core.reload
and omf.core.reload
# If omf.core.reload exist, current fish will be replaced via exec, so
# 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment