diff --git a/lib/refresh.fish b/lib/refresh.fish deleted file mode 100644 index d6b8dce6e7e619507e805431fd1cf9ca60adfa95..0000000000000000000000000000000000000000 --- a/lib/refresh.fish +++ /dev/null @@ -1,12 +0,0 @@ -# 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 diff --git a/pkg/omf/functions/compat/refresh.fish b/pkg/omf/functions/compat/refresh.fish new file mode 100644 index 0000000000000000000000000000000000000000..261a183df72941103c3ee9980e13b6b436e27aa0 --- /dev/null +++ b/pkg/omf/functions/compat/refresh.fish @@ -0,0 +1,14 @@ +function refresh -d "(deprecated) Refresh fish session by replacing current process" + printf 'warning: function %srefresh%s is deprecated and will be removed soon.\n %s\n' \ + (set_color -u) (set_color normal) \ + (status -t)[5] >&2 + + set -q CI + and return 0 + + type -q omf.core.reload + and omf.core.reload + + history --save + exec fish +end