Age | Commit message (Collapse) | Author |
|
|
|
* Add ability to use an alternate directory truncation style
|
|
Remove forced unwrap since match is already exhausted
|
|
The 'battery' crate doesn't support Termux, so we are temporarily making the battery module optional.
|
|
on Zsh, battery percentage character would print %
this PR fixes print %{ -> %
|
|
|
|
|
|
|
|
Added the ability to enable the Python module based on the existence of the a `Pipfile`.
|
|
|
|
|
|
listing flag (#197)
|
|
scripts (#168)
Implement a two-phase init procedure in starship. The first phase causes the shell to source a subshell, while the second phase (in the subshell) prints the main init script.
This allows us to have nice init scripts with good styling, comments, and no pile of semicolons. Even better, it works as a drop-in replacement, so we don't need to update the docs.
|
|
default order (#171)
Adds functionality for reordering the prompt module through the use of the prompt_order configuration option in starship.toml
|
|
Solves the issue of cursor location confusion on bash and zsh (#110) . Solution: modify ANSIString and wrap non-printing characters with correct escape sequences.
|
|
|
|
|
|
|
|
Allows bash users to run a function before the shell is drawn, by defining a function and setting its name equal to starship_precmd_user_func.
|
|
Add Vi-mode indicator for zsh
|
|
|
|
|
|
|
|
|
|
|
|
Fixes #148
|
|
* fix: Give all modules a single name
* test: Add missing config tests for nodejs and golang
* test: Rename dir to directory
|
|
MacOS wc has a habit of leaving nasty spaces in the output, which was
messing up our argparser.
To fix, quote the output from the jobs command, then have Rust trim out
whitespace in the jobs module before parsing.
|
|
This behavior can be enabled via setting `use_pyenv` to true.
The "pyenv" prefix before the version name can be configured using `pyenv_prefix`.
|
|
|
|
|
|
|
|
Prompt can now switch characters in addition to switching character color. Add configuration options in so that users can do either, both, or neither.
|
|
|
|
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)
|
|
|
|
|
|
This allows the directory truncation length to be configured. Previously, it was hard-coded to truncate to 3 parent directories.
|
|
Prior to this change, starship would use inconsistent slashes when displaying the working directory. With this change, starship uses Unix-style slashes on all platforms. This is consistent with the Git Bash and Cygwin prompts on Windows.
|
|
- 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.
|
|
Making use of PROMPT_COMMAND in bash and precmd in zsh, the prompt is no longer being expanded and rendered when the variable is initially set.
|
|
Add support for paths to init function
This adds support for qualified paths (e.g. using
`/usr/local/bin/zsh` instead of `zsh`) to init.rs.
The function now converts the shell name into an
OsStr, then to a Path, then gets the file stem,
and unwraps back into a str. While this process can
fail (yielding a None), it's highly unlikely to unless
the user has messed with their shells or there's an
issue in Starship--therefore, the failure message in
this case simply asks the user to file a bug report.
|
|
|
|
|
|
Co-authored-by: Tiffany Le-Nguyen <tlenguyen@expedia.com>
Co-authored-by: Matan Kushner <hello@matchai.me>
|
|
|
|
|
|
• Add starship init which prints the shell function used to execute starship
• Document the new setup process using starship init
• Remove benchmarks for now (WIP replacement benchmarks in "benchmarking" branch )
|
|
• Add support for the disabled configuration option
This will allow you to selectively disable modules that you don't want or need. 😄
• Overwrite starship configuration file path with STARSHIP_CONFIG environment variable
• Write tests for the two configuration options that are available
|
|
- Create `Config` struct that is added to `Context` when initialized
- Read `~/.confg/starship.toml` during initialization (can be updated later to also look at `$XDG_CONFIG_HOME`)
- `Context` now has a method for creating modules. This allows us to provide modules with a reference to the configuration specific to that module
|