Skip to content

Commit 149490a

Browse files
committed
update comments
1 parent 2295945 commit 149490a

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

modules/prompt/basic-git.nu

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
# Max Brown
2-
# a very basic git prompt
3-
# sort of like panache-git, but fewer than 60 lines of code.
1+
# It's a very basic git prompt,
2+
# sort of like panache-git, but less than 50 lines of code.
43

5-
# use as below without the comments and in your
6-
# env.nu file
4+
# Authors: Max Brown, @rukins
75

6+
# Use as below without the comments and in your 'env.nu' file
87

98
# use path/to/basic-git.nu basic-git-left-prompt
10-
119
# $env.PROMPT_COMMAND = {||
1210
# let left = create_left_prompt
1311
# basic-git-left-prompt $left
@@ -19,7 +17,6 @@ def in_git_repo [] {
1917

2018
export def basic-git-left-prompt [in_left_prompt] {
2119

22-
# if we're in a repo, let's go!
2320
let currently_in_git_repo = in_git_repo
2421

2522
if $currently_in_git_repo {
@@ -40,14 +37,12 @@ export def basic-git-left-prompt [in_left_prompt] {
4037
}
4138
}
4239
| each {
43-
|el| $"(ansi "cyan_bold")($el.count)(ansi $el.X.color)($el.X.value)(ansi $el.Y.color)($el.Y.value)(ansi reset)"
40+
|el| $"(ansi cyan_bold)($el.count)(ansi $el.X.color)($el.X.value)(ansi $el.Y.color)($el.Y.value)(ansi reset)"
4441
}
4542
| str join ","
4643

47-
# construct the prompt
4844
$"($in_left_prompt)(ansi reset) [($current_branch)($current_status | if ($in | is-not-empty) { $' ($in)' })]"
4945
} else {
50-
# otherwise just return the normal prompt
5146
$in_left_prompt
5247
}
5348
}

0 commit comments

Comments
 (0)