mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-03-10 05:25:14 +08:00

- Copy and improve help text, and convert it to AsciiDoc files - Evaluate commands dynamically
22 lines
600 B
Fish
22 lines
600 B
Fish
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.reload
|
|
and omf.reload
|
|
|
|
# If omf.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
|