How to remove leading and trailing spaces from plain block #3089
Answered
by
JanDeDobbeleer
JustinGrote
asked this question in
Troubleshoot
# yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
final_space: true
version: 2
blocks:
- type: prompt
alignment: left
segments:
- type: path
style: plain
background: "#333333"
properties:
home_icon: 🏠
mapped_locations_enabled: true
mapped_locations:
"~/Projects": "🚧"
"~/Documents": "📄"
"~": "🏠"
mixed_threshold: 4
hide_root_location: false
prefix: 'aaa'
postfix: 'aaa'
- type: text
style: plain
prefix: 'a'
postfix: 'a'
background: "transparent"
foreground: "#333333"
template: ""
- type: prompt
alignment: left
newline: true
segments:
# - type: exit
# style: diamond
# foreground: "#ffffff"
# background: "#ff0000"
# properties:
# always_enabled: true
# error_symbol: "✖"
# success_symbol: ""
# show_exit_code: false
# show_symbol: true
- type: text
style: plain
foreground: "green"
template: "❯"
valid_line:
background: "transparent"
foreground: "#ffffff"
template: "<green>❯ </>"
error_line:
background: "transparent"
foreground: "#ffffff"
template: "<red>❯ </>"The docs: https://ohmyposh.dev/docs/configuration/segment#plain say to use |
Answered by
JanDeDobbeleer
Nov 17, 2022
Replies: 1 comment 2 replies
|
@JustinGrote that needs to be adjusted as it's not correct. To adjust that, edit the segment's template. |
2 replies
Answer selected by
JustinGrote
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

@JustinGrote that needs to be adjusted as it's not correct. To adjust that, edit the segment's template.