Pure Fish Pure Versions Save

Pretty, minimal, and fast prompt for Fish shell inspired by sindresorhus/pure

v4.11.0

3 months ago

What's Changed

:book: New Documentation

  • a better User eXperience (UX)
  • a dedicated site,
  • searchable content (thanks to mkdocs)
  • screenshot of prompt with/without feature enabled (thanks to terminal-screenshot)
  • a better organization for options
  • linkable content you can share/bookmark

image

:sparkles: rAWS Profile

Option Default Description
pure_enable_aws_profile true Show AWS profile name (based on AWS_VAULT or AWS_PROFILE).
pure_symbol_aws_profile_prefix Prefix when a AWS profile is activated (default: [undefined][to-set])
with a AWS Vault with a AWS Profile
image image

:robot: Test against MacOS in CI

We use brew to install Fish.

New Contributors

Full Changelog: https://github.com/pure-fish/pure/compare/v4.10.1...v4.11.0

v4.10.1

3 months ago

What's Changed

Nix develop Shell activation

Option Default Description
pure_enable_nixdevshell false Indicate if a nix develop shell is activated (based on IN_NIX_SHELL).
pure_symbol_nixdevshell_prefix ❄️ otherwise nerdfonts: '󱄅' or ''
pure_color_nixdevshell_prefix pure_color_info prefix color
pure_color_nixdevshell_symbol pure_color_mute symbol color

Usage

set --universal pure_enable_nixdevshell true

New Contributors

v4.9.0

3 months ago

What's Changed

Config

:computer: Prompt shortening

Option Default Description
pure_truncate_prompt_current_directory_keeps 0 Truncate working directory path in prompt, but keeps the last to n components (0 full path in current directory)
set --universal pure_truncate_prompt_current_directory_keeps 2

image

:window: Window's title shortening

Option Default Description
pure_truncate_window_title_current_directory_keeps 0 Truncate working directory path in window title, but keeps the last to n components (0 keep full path in window title)
set --universal pure_truncate_window_title_current_directory_keeps 2

:clap: Thanks

  • @1999masih for suggesting the idea

Full Changelog: https://github.com/pure-fish/pure/compare/v4.8.3...v4.9.0

v4.8.2

5 months ago

What's Changed

Default when no namespace set

image

New Contributors

Full Changelog: https://github.com/pure-fish/pure/compare/v4.8.1...v4.8.2

v4.8.1

7 months ago

What's Changed

  • refactor k8s support #330

:art: New config in conf.d/pure.fish

_pure_set_default pure_color_k8s_symbol pure_color_dark

Usage

set --universal pure_enable_k8s true # enable the featyre
set --universal pure_color_k8s_symbol cyan # customize color

Preview

image

:clap: Thanks

  • @bobsoppe for spotting the gap and submitting the PR

v4.8.0

8 months ago

What's Changed

NixOS Support

Some of the tests and test utils assumed they were ran by $USER=nemo. This is not the case in NixOS and probably other distros as well. We fixed the tests for NixOS, but there is still work to do ensure

CI

NixOS Job

We added a job to run the test again NixOS 2.17.0 using Fish 3.6.1 only

image

Dropping Versions Support

The following versions have been dropped, following our Versions Support Strategy

- Fish: 3.0.2
- Fish: 3.1.2
- Fish: 3.2.2
- Fish: 3.3.1

Mocks

We recently introduced a set of helpers functions to mock and spy system or pure's function. Here is a summary, but be sure to check the content of https://github.com/pure-fish/pure/tree/master/tests/mocks for implementation details.

Mocking

  • _mock: Mock a function using the mock in tests/mocks/
    • function_name: name of the method to mock
  • _mock_exit_status: Mock a response exit status for a mock function
    • function_name: name of the method to mock
    • status_code: response to return
  • _mock_response: Mock a response for a mock function
    • function_name: name of the method to mock
    • response: response to return
  • _clean_mock: Clean a mock function (warning: erase the function)
    • function_name: name of the method to mock

Spying

  • _spy: Create a spy method so, you can check it's been called with _has_called
    • function_name: name of the method to spy
  • _has_called: check spy method has been called, i.e has written to the /tmp/$function_name.mock_calls
    • function_name: name of the that have been spied on
    • function_args # arguments to passed to the spy

Cleaning

  • _clean_all_mocks: Clean all mock functions created by _mock
  • _pure_unmock: Restore a pure function by reloading its source
    • function_name: name of the method to mock
  • _clean_all_spy_calls: Clean all spy calls created by _spy

:arrow_down: Installation

fisher update pure-fish/pure; or fisher install pure-fish/pure

:clap: Thanks

  • @pacien for spotting the issue, providing feedback about NixOS and his patience

Full Changelog: https://github.com/pure-fish/pure/compare/v4.7.1...v4.8.0

v4.7.1

8 months ago

What's Changed

Full Changelog: https://github.com/pure-fish/pure/compare/v4.7.0...v4.7.1

v4.7.0

8 months ago

What's Changed

:snake: Add feature flag and customization symbol for Virtualenv

Preview

image

Configuration

Option Default Description
pure_symbol_virtualenv_prefix Prefix when a Python virtual env is activated (default: undefined)
pure_enable_virtualenv true Show virtual env name (based on VIRTUAL_ENV or CONDA_DEFAULT_ENV).

Default Behaviour: true

❯ set --universal pure_enable_virtualenv true

Feature Enable: true

❯ set --universal pure_enable_virtualenv true
❯ set --universal pure_symbol_virtualenv_prefix "🐍 "

Then activate a virtualenv or simulate one:

❯ set VIRTUAL_ENV /home/test/fake/project/ # simulate virtualenv
~/projects/contributions/pure master ≡
🐍 project ❯

pure_enable_virtualenv.webm

:arrow_down: Installation

fisher install pure-fish/pure

:clap: Thanks

  • @Sbozzolo for initiating the conversation #274
  • @dwt for suggesting the emoji #291

Full Changelog: https://github.com/pure-fish/pure/compare/v4.6.4...v4.7.0

v4.6.4

8 months ago

What's Changed

Full Changelog: https://github.com/pure-fish/pure/compare/v4.6.3...v4.6.4

v4.6.3

8 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/pure-fish/pure/compare/v4.6.2...v4.6.3