@@ -123,8 +123,9 @@ depending on your current context. In this you can see:
123
123
124
124
* I'm in a directory called ` dotfiles `
125
125
* I'm currently in a Git repo, but not on any branch instead checked out an
126
- arbitrary commit with SHA 931e5c4
127
- * I don't know what the coffee cup is 🤷
126
+ arbitrary commit with SHA ` 931e5c4 `
127
+ * The coffee cup has to do with Java, but I don't have a valid JDK installed so
128
+ it's not showing what version
128
129
* My current Python environment is Python 3.9.2
129
130
* My AWS environment is configured to communicate with the ` ca-central-1 ` region
130
131
@@ -171,16 +172,16 @@ module, I gave this a try to configure it:
171
172
[directory ]
172
173
truncation_length = 100
173
174
truncate_to_repo = false
174
- style = " yellow"
175
+ style = " yellow"
175
176
format = " [:$path]($style)[$read_only]($read_only_style) "
176
177
```
177
178
178
179
Let's explain this a little bit to give a feel:
179
180
180
181
* ` truncation_length ` controls how many directories deep you have to be before
181
182
Starship will abbreviate the directory name in your prompt. I rarely go very
182
- deep and TBH when I do I still want to see the full path so I made the number
183
- rediculously high so that it never truncated
183
+ deep and to be honest when I do I still want to see the full path so I made
184
+ the number rediculously high so that it never truncated
184
185
* ` truncate_to_repo ` is a special setting that controls if the directory is
185
186
truncated to the root of the Git repo you are currently in. Again, I don't
186
187
like this (I want to see the full path), so disabled it
@@ -199,7 +200,7 @@ followed by the value of the `$path` variable. Each module has its own set of
199
200
variables that get populated with values that are relevant to that module (in
200
201
this case ` $path ` ends up being the full path of the current working directory).
201
202
The brackets that follow a text group specify a ` style string ` . You might
202
- wonder "but isn't that what the ` style ` setting is for? And yes, but
203
+ wonder "but isn't that what the ` style ` setting is for?" And yes, but
203
204
essentially the ` style ` setting defines the "default" style within a module, and
204
205
style strings within the format can override that. In this case, ` $style `
205
206
corresponds to the ` style ` setting defined in the configuration for the module
@@ -218,7 +219,7 @@ tweak each module to your liking.
218
219
Ok, that's fine, but Adam how do we control the order of items in the prompt?
219
220
And that's a good question that took me a little while to figure out. Turns
220
221
out that the prompt as a whole has a ` format ` setting. The default is to show
221
- effectively all modules:
222
+ all modules, this is from the docs :
222
223
223
224
``` toml
224
225
format = " $all"
@@ -281,16 +282,16 @@ $character"""
281
282
```
282
283
283
284
This is what controls the order of items. Move an item up, and it'll appear
284
- earlier in the prompt, move down to move it later in the prompt. It also
285
- provides a global "completely hide" ability for module -- if you remove it from
286
- the format then it won't be displayed. Personally I don't like this, as it
287
- means if you want to change the order of items you have to override the
288
- * entire* format string. It'd be nice if there was an "index" value or something
289
- on each module that could determine ordering, but oh well.
285
+ earlier in the prompt, move down to move it later in the prompt. Personally I
286
+ don't like this, as it means if you want to change the order of items you have
287
+ to override the * entire* format string. It'd be nice if there was an "index"
288
+ value or something on each module that could determine ordering, but oh well.
290
289
291
- Note that I don't think hiding from the format is the same thing as * disabling*
292
- a module. Each module has a ` disabled ` setting which (if true) disables that
293
- module (so won't get displayed, and I believe not evaluated).
290
+ In any case it also provides a global "completely hide" ability for a module --
291
+ if you remove it from the format then it won't be displayed. Note that I don't
292
+ think hiding from the format is the same thing as * disabling* a module. Each
293
+ module has a ` disabled ` setting which (if true) disables that module (so won't
294
+ get displayed, and I believe not evaluated).
294
295
295
296
Ok, with this I continued on and got most of my old prompt in place:
296
297
@@ -319,9 +320,6 @@ untracked = ""
319
320
format = ' ([\[$conflicted$deleted$renamed$modified$staged$behind\]]($style) )'
320
321
modified = ' *'
321
322
322
- [python ]
323
- format = ' [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\))]($style)'
324
-
325
323
[status ]
326
324
disabled = false
327
325
format = ' [\[$status - $common_meaning\]](green)'
@@ -562,7 +560,7 @@ disabled = true
562
560
# time_format = "%a %b %d %Y %l:%M%p (%z)"
563
561
```
564
562
565
- Note current version in case I revise in the future is at:
563
+ Note current version ( in case I revise in the future) is at:
566
564
[ https://github.com/pzelnip/dotfiles/blob/mainline/.config/starship.toml ] ( https://github.com/pzelnip/dotfiles/blob/mainline/.config/starship.toml ) )
567
565
568
566
This gives a prompt like the following:
0 commit comments