Skip to content

Conversation

edouard-lopez
Copy link
Member

@edouard-lopez edouard-lopez commented Dec 19, 2024

related: fixes #356

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.


TODO

  • Fix tests

How to test pre-release?

☠️ Feature can be unstable and break your prompt!

fisher install pure-fish/pure@fix/no-line-spacing-between-prompts-356 # branch name

Specs

Documentation

Event handlers aren't autoloaded, so we need to force loading of the _pure_prompt_new_line handler in the init process.

Acceptance Checks

  • Documentation is up-to-date:
    • Add entry in feature list of README.md ;
    • Add entry in features' overview in docs/ ;
    • Add section in feature list to document
      • Features' flag ;
      • Prompt symbol ;
  • Default are defined in conf.d/pure.fish for:
    • Feature flag ;
    • Symbol ;
  • Tests are passing (I can help you 🤗 ):
  • Customization is available ;
  • Feature is implemented.

@edouard-lopez
Copy link
Member Author

Test are silently failing

# /home/nemo/.config/fish/pure/tests/_pure_init.test.fish
source: Error encountered while sourcing file '/home/nemo/.config/fish/functions/_pure_prompt_new_line.fish':
source: No such file or directory
ok 103 init: _pure_fresh_session
source: Error encountered while sourcing file '/home/nemo/.config/fish/functions/_pure_prompt_new_line.fish':
source: No such file or directory

@edouard-lopez edouard-lopez added the 🐛 bug something that doesn't works as expected label Dec 19, 2024
@parnavh
Copy link

parnavh commented Dec 23, 2024

Seems to do the trick! There is a space now after the output of a command

Although it doesn't have space above the initial prompt, seems to be fine after clear but not right when the terminal is initialized

@edouard-lopez
Copy link
Member Author

I'm using Tmux which might differ from what you have, could you share a screenshot?

@parnavh
Copy link

parnavh commented Dec 29, 2024

space between command works but no space above the initial prompt as there was before:
image

works after clear:
image

terminal: alacritty

@parnavh
Copy link

parnavh commented Jan 15, 2025

Any update?

… 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
@edouard-lopez
Copy link
Member Author

I'm rebasing and merging as the initial issue was fixed.

@edouard-lopez edouard-lopez force-pushed the fix/no-line-spacing-between-prompts-356 branch from 215acb1 to 159e0b6 Compare May 19, 2025 19:34
@edouard-lopez edouard-lopez merged commit 8a6ed99 into master May 19, 2025
3 of 6 checks passed
@edouard-lopez edouard-lopez deleted the fix/no-line-spacing-between-prompts-356 branch May 19, 2025 19:34
@caspervk
Copy link

caspervk commented May 24, 2025

This broke on NixOS for me. _pure_prompt_new_line.fish is in e.g. /nix/store/p2v91vkhi3kr5gn4q2l4dmj266v7zfab-system-path/share/fish/vendor_functions.d/_pure_prompt_new_line.fish not ~/.config/fish/functions/ (that dir is empty).

Reported in nixpkgs: NixOS/nixpkgs#408917 (comment)

edouard-lopez added a commit that referenced this pull request May 27, 2025
…ry too

related: fix: source _pure_prompt_new_line event handler instead of relying on autoloading #357
edouard-lopez added a commit that referenced this pull request May 27, 2025
…ry too

fixes #369
related: fix: source _pure_prompt_new_line event handler instead of relying on autoloading #357
@edouard-lopez
Copy link
Member Author

@caspervk please check #371

edouard-lopez added a commit that referenced this pull request Jun 2, 2025
…ry too

fixes #369
related: fix: source _pure_prompt_new_line event handler instead of relying on autoloading #357
edouard-lopez added a commit that referenced this pull request Jun 2, 2025
…ry too

fixes #369
related: fix: source _pure_prompt_new_line event handler instead of relying on autoloading #357
edouard-lopez added a commit that referenced this pull request Jun 6, 2025
…ry too

fixes #369
related: fix: source _pure_prompt_new_line event handler instead of relying on autoloading #357
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 this pull request may close these issues.

No line spacing between prompts
3 participants