Use builtin functions instead of head for uninstalling fish_prompt

This commit is contained in:
Ilan Cosman 2020-10-02 15:59:21 -07:00
parent 432cc5cce6
commit 3f2ab29d28
2 changed files with 4 additions and 4 deletions

View File

@ -12,8 +12,9 @@ function _tide_sub_uninstall
rm -r $_tide_dir
end
if test (head -n 1 $fishPrompt) = '# Created by tide configure'
rm $fishPrompt
if test (functions --details --verbose fish_prompt)[5] = 'Created by tide configure'
rm (functions --details fish_prompt)
source "$__fish_data_dir/functions/fish_prompt.fish"
end

View File

@ -1,5 +1,4 @@
# Created by tide configure
function fish_prompt --description 'Write out the prompt'
function fish_prompt --description 'Created by tide configure'
set -g _tide_last_pipestatus $pipestatus
set -g _tide_last_status $status