Have restored the `pyenv_prefix` option to the python module. This is
added as a new variable that will only be shown if `pyenv` is being used
to determine the version of python that is being used.
Previously, all modules would have prefixes, which lead to the first
module having a dangling prefix. This change ensures that the first
few modules would instead have suffixes so that we don't start or
end with a prefix or suffix.
* docs: Clarify that commands will be passed in on stdin
* docs: Clearer instruction how to include individual custom modules
* docs: Include link to #1252 in docs for custom modules
That issue is used to share custom modules.
* docs: Remove reference to prompt_order
Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
The hostname module does not provide any "number" variable, its presence
in the documentation is likely due to some copy&paste from the jobs
module section, so let's drop it.
Signed-off-by: Emanuele Aina <em@nerd.ocracy.org>
* initial commit of support for shlvl
* documentation for shlvl
* use a symbol instead
* test coverage for shlvl
* actually disable when the config says to
* fix docs
* tweak defaults some
* refactor from pr comments
* redisable
* return early to avoid indenting
* make default suffix empty space
* fixing tests after suffix change
* updating docs for format
* making shlvl compatible with formatting
* adding variables table for shlvl
* removing extra line
* doc clarity
* Add gitignore for Emacs backup files.
* Add package version support for Maven pom.xml.
* Update docs with Maven package version support.
* Fix for clippy.
Given how slow the Haskell module is (#1240), it is slowing down the entire prompt
from rendering when the module is active. This commit removes the module until we
can find a faster way to retreive the Haskell version.
* Add option to change the python binary
We are going to start to have problems with the python binary as python2
is removed and replaced with python3. To make the transition easier I
have added an option to the python module to allow the user to pick a
particular binary, e.g `python3`, for the module to use when selecting
the version of python. I have also refactored the python tests moving
almost all of them into the module and removing the dependency on the
version of python that is installed on the system.
* Add advanced config section to python module docs
Have added an advanced config section to the python module docs and
moved the `python_binary` option into that section.
* Nim module and tests
* Add nim to docs
* parse_nim_version refactor, add nim desc
* Add nim symbol to Nerd Font preset
* Yellow with v prefix as default version
* Nim version fmt fix
* Update docs/config/README.md
Co-authored-by: Dario Vladović <d.vladimyr@gmail.com>
* Update src/modules/nim.rs
Co-authored-by: Dario Vladović <d.vladimyr@gmail.com>
* Nim module and tests
* Add nim to docs
* Yellow with v prefix as default version
* Update docs/config/README.md
Co-authored-by: Dario Vladović <d.vladimyr@gmail.com>
* Update src/modules/nim.rs
Co-authored-by: Dario Vladović <d.vladimyr@gmail.com>
* Add nim to docs, proper version formatting.
* Remove v from symbol, add to fmt string
* cargo fmt
Co-authored-by: Dario Vladovic <d.vladimyr@gmail.com>
* Creation of range field in TimeConfig
* time_range parsing
* Hide time module if outside of time_range
* Tidying of code, and properly handling more cases
* is_inside_time_range function
* Tests and fmt
* Update docs
* The configuration needs the 24-hours format
* Fix clippy errors
To improve overall support of PowerShell in custom modules,
the ability to pass arguments to the shell was also added. Additionally,
the arguments `-NoProfile -Command -` will be automatically passed
to PowerShell, unless other arguments are given by the user.
* Added configs/purescript
* Added modules/purescript
* Added necessary codes
* Added tests
* Updated README
* Fixed color because black is hard to see
* Fixed of push mistake
* Fixed pointed out in PR
According by this standards
> While "Julia" is a female name in many parts of the world, the programming language is not a person and does not have a gender.
* Use AWS_VAULT as the profile if set
[aws-vault](https://github.com/99designs/aws-vault) sets
the `AWS_VAULT` env var instead of `AWS_PROFILE` when an
aws-vault session is active.
This PR adds support for reading the AWS profile value from
the `AWS_VAULT` env var, giving priority to `AWS_VAULT` if both
it and `AWS_PROFILE` are set.
* Update docs for AWS_VAULT
* feat: add docker context module
Adds a simple module that checks for a Docker config file and if present, reads the `currentContext` value out and displays on the prompt with a whale.
* feat: add `only_with_compose_yml` option to docker_context
When enabled, will only show the docker context name if there's a docker-compose.yml file in the current directory.
* Update src/modules/docker_context.rs
Co-Authored-By: Thomas O'Donnell <andytom@users.noreply.github.com>
* Update src/modules/docker_context.rs
Co-Authored-By: Thomas O'Donnell <andytom@users.noreply.github.com>
* rename `only_with_compose_yml` configuration key to a more generic `only_with_files`
* Update src/modules/docker_context.rs
Co-Authored-By: Thomas O'Donnell <andytom@users.noreply.github.com>
* re-order configuration table
* Update docs/config/README.md
Co-Authored-By: Thomas O'Donnell <andytom@users.noreply.github.com>
* Update src/configs/docker_context.rs
Co-Authored-By: Thomas O'Donnell <andytom@users.noreply.github.com>
Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
* Allow kubernetes module to use aliases for contexts
* documentation for kubernetes context aliasing
* Apply suggestions from code review: consistent ordering of options in documentation
Co-Authored-By: Thomas O'Donnell <andytom@users.noreply.github.com>
Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
This PR adds package version support for Gradle projects. The version number is extracted from the `build.gradle` file in the current directory, similar to existing support for other packages.
Currently the Java module detection looks for build.gradle specifically, but it's possible to rename build.gradle to *.gradle. This change adds Gradle files to the list of detected file extensions.
Also addresses a number of bugs:
- the percent sign not displaying correctly on some terminal emulators, including kitty
- changing the symbol in the configuration file didn't do anything
- swap being shown even if the system didn't have any
This updates the default AWS default symbol to include a space after the
symbol to make it a little bit more readable. Have also updated the
README to include the AWS module.
Given the global nature of the Kubernetes module, the module has been disabled by default. The opportunity has also been taken to refactor the Kubernetes module to use the new config module.
Add a configuration option (show_sync_count) to the git_status module that will show/hide the counts ahead/behind of the tracked branch. Currently have this default to false, and would opt-in to show this information.
Git branches can become very long (e.g. gitlab auto-generated branch
names), thus it would be nice to be able to truncate them to keep your
prompt lenght in line.
This patch adds two new options to the git_branch module:
* truncation_length: The amount of graphemes to of a gitbranch to
truncate to
* truncation_symbol: The symbol that should be used to indicate that a
branch name was trunctated
To be able to correctly work with UTF-8 graphemes, unicode-segmentation
was added as a dependency.
Implement a timer module that takes a commandline argument, the number of seconds the last job took to complete, and displays it if appropriate.
Alters shell initialization files to compute this number using date +%s where needed.
Adds a config section to configure minimum amount of time before timer is shown (default is 2s)
- Replace TableExt with a Config trait that extends toml::value::Table
Add configuration for add_newline
- add_newline is a root-level configuration value. When set to false, the initial newline before the prompt is removed.