acomagu / fish-async-prompt

Make your prompt asynchronous to improve the reactivity.
MIT License
390 stars 22 forks source link

Variable name '__async_prompt_fish_prompt_text_%self' is not valid #2

Closed c02y closed 3 years ago

c02y commented 5 years ago

set: Variable name '__async_prompt_fish_prompttext%self' is not valid. See help identifiers. Standard input (line 16): set -U async_prompt_fish_prompttext%self (fish_prompt) ^ kill: failed to parse argument: '%self' set: Variable name 'async_prompt_fish_right_prompttext%self' is not valid. See help identifiers. Standard input (line 16): set -U __async_prompt_fish_right_prompttext%self (fish_right_prompt) ^ kill: failed to parse argument: '%self'

FYI fish, version 2.7.1-1368-gb39651f

acomagu commented 5 years ago

I can't reproduce... Is it happens every time on showing prompt?

c02y commented 5 years ago

I'm currently using fish, version 2.7.1-1547-gdfe6bc5-dirty, git commit dfe6bc5 is the latest one.

If

source /path/to/__async_prompt.fish

in config.fish, and source the config.fish, I got the following error message after every Enter key and there is no prompt symbol such as user@localhost: dir, just the following error message:

test returned eval errors:
        invalid number ''

And if I use the following command to clean all my fish configuration:

sh -c 'env HOME=$(mktemp -d) fish'

which is suggested by official new issue page of fish-shell github page and then

source /path/to/__async_prompt.fish

There will be the following error message (check the attached file for the whole content)

I don't know if you can reproduce this, but you can try.

typescript.txt

acomagu commented 5 years ago

OK, I could reproduced. I'll investigate. Thank you for telling the detail!

acomagu commented 5 years ago

Fixed at 0d63f8c Thanks!

c02y commented 5 years ago

Sorry about this.

If I use the following command to clean all my fish configuration:

  sh -c 'env HOME=$(mktemp -d) fish'

which is suggested by official new issue page of fish-shell github page and then

  source /path/to/__async_prompt.fish

It seems OK, but if I

source /path/to/__async_prompt.fish

in my config.fish and use normal fish not the sh -c 'env HOME=$(mktemp -d) fish' one, the problem I mentioned:

test returned eval errors:
    invalid number ''

is still there.

c02y commented 5 years ago

Any updates?

acomagu commented 3 years ago

It must be fixed now. I'm sorry for long blank.