Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot uninstall 4.4.1 #314

Closed
andreisoktoev opened this issue Feb 1, 2023 · 2 comments · Fixed by #316
Closed

Cannot uninstall 4.4.1 #314

andreisoktoev opened this issue Feb 1, 2023 · 2 comments · Fixed by #316
Labels
🐛 bug something that doesn't works as expected

Comments

@andreisoktoev
Copy link

andreisoktoev commented Feb 1, 2023

_pure_uninstall

math: Error: Unexpected token
' * 1000'
  ^
test: Missing argument at index 3
29 -lt
       ^
~/.config/fish/functions/_pure_format_time.fish (line 13):
    test "$milliseconds" -lt (math --scale=0 "$threshold * 1000"); and echo; and return $SUCCESS
    ^
in function '_pure_format_time' with arguments '29'
	called on line 1 of file ~/.config/fish/functions/_pure_prompt_command_duration.fish
in command substitution
	called on line 6 of file ~/.config/fish/functions/_pure_prompt_command_duration.fish
in function '_pure_prompt_command_duration'
	called on line 1 of file ~/.config/fish/functions/_pure_prompt_first_line.fish
in command substitution
	called on line 9 of file ~/.config/fish/functions/_pure_prompt_first_line.fish
in function '_pure_prompt_first_line'
	called on line 1 of file ~/.config/fish/functions/_pure_print_prompt_rows.fish
in command substitution
	called on line 8 of file ~/.config/fish/functions/_pure_print_prompt_rows.fish
in function '_pure_print_prompt_rows'
	called on line 6 of file ~/.config/fish/functions/fish_prompt.fish
in function 'fish_prompt'
in command substitution
test: Missing argument at index 3
0 -gt
      ^
~/.config/fish/functions/_pure_format_time.fish (line 29):
        test "$seconds" -gt $threshold; and set --append time (printf "%ss" $seconds)
        ^
in function '_pure_format_time' with arguments '29'
	called on line 1 of file ~/.config/fish/functions/_pure_prompt_command_duration.fish
in command substitution
	called on line 6 of file ~/.config/fish/functions/_pure_prompt_command_duration.fish
in function '_pure_prompt_command_duration'
	called on line 1 of file ~/.config/fish/functions/_pure_prompt_first_line.fish
in command substitution
	called on line 9 of file ~/.config/fish/functions/_pure_prompt_first_line.fish
in function '_pure_prompt_first_line'
	called on line 1 of file ~/.config/fish/functions/_pure_print_prompt_rows.fish
in command substitution
	called on line 8 of file ~/.config/fish/functions/_pure_print_prompt_rows.fish
in function '_pure_print_prompt_rows'
	called on line 6 of file ~/.config/fish/functions/fish_prompt.fish
in function 'fish_prompt'
in command substitution
@edouard-lopez
Copy link
Member

Workaround

You can disable pure prompt by redefining the fish_prompt function, e.g.:

function fish_prompt; echo '❯ '; end

If you want to remove all files, you can remove them with this glob:

echo $HOME/.config/fish/{functions,conf.d}/pure*.fish
# check the output, then use `rm` instead of `echo`

Debug

Please provide the following information to help us debug your issue faster.

Env

Pure

echo $pure_version

Fish

fish --version

OS/distribution

lsb_release -a

@edouard-lopez edouard-lopez added the 🐛 bug something that doesn't works as expected label Feb 1, 2023
@edouard-lopez
Copy link
Member

A cleaner way to restore the default prompt is:

cp {$__fish_data_dir,$__fish_config_dir}/functions/fish_prompt.fish

Could you share the reason that lead you to uninstall?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug something that doesn't works as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants