Skip to content

Commit

Permalink
fix: source _pure_prompt_new_line event handler instead of relying on…
Browse files Browse the repository at this point in the history
… autoloading

From the doc: https://fishshell.com/docs/current/language.html#event
> Please note that event handlers only become active when a function is loaded,
> which means you need to otherwise source or execute a function instead of
> relying on autoloading.

fix #356
  • Loading branch information
edouard-lopez committed Dec 19, 2024
1 parent 28447d2 commit 215acb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions conf.d/_pure_init.fish
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set --global --export VIRTUAL_ENV_DISABLE_PROMPT 1
# Whether or not is a fresh session
set --global _pure_fresh_session true

# Register `_pure_prompt_new_line` as an event handler fot `fish_prompt`
functions --query _pure_prompt_new_line
# Register `_pure_prompt_new_line` as an event handler for `fish_prompt`
source $__fish_config_dir/functions/_pure_prompt_new_line.fish

function _pure_uninstall --on-event pure_uninstall
rm -f $__fish_config_dir/conf.d/pure.fish
Expand Down

0 comments on commit 215acb1

Please sign in to comment.