Merge pull request #26 from Ma27/make-dir-levels-configurable

Make dir levels shown in the prompt configurable
This commit is contained in:
Hasib Billah
2019-04-17 05:20:56 +06:00
committed by GitHub
2 changed files with 13 additions and 1 deletions

View File

@@ -7,3 +7,15 @@ A ZSH theme optimized for people who use:
---
![Screenshot](https://raw.githubusercontent.com/halfo/lambda-mod-zsh-theme/master/screenshot.png)
## Configuring the amount of dir levels
By default only the last three directories are shown in the prompt. The amount of
levels can be configured by setting `LAMBDA_MOD_N_DIR_LEVELS` before loading the prompt:
``` zsh
# ~/.zshrc
export LAMBDA_MOD_N_DIR_LEVELS=10
# load `lambda-mod` and `oh-my-zsh`
```

View File

@@ -30,7 +30,7 @@ function get_right_prompt() {
PROMPT=$'\n'$LAMBDA'\
%{$fg_bold[$USERCOLOR]%}%n\
%{$fg_no_bold[magenta]%}[%3~]\
%{$fg_no_bold[magenta]%}[%'${LAMBDA_MOD_N_DIR_LEVELS:-3}'~]\
$(check_git_prompt_info)\
%{$reset_color%}'