mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-28 04:19:41 -08:00
parent
dde2064ea1
commit
7486558436
|
@ -10,11 +10,6 @@ import (
|
||||||
//go:embed scripts/omp.bash
|
//go:embed scripts/omp.bash
|
||||||
var bashInit string
|
var bashInit string
|
||||||
|
|
||||||
const (
|
|
||||||
unixUpgrade = "$_omp_executable upgrade"
|
|
||||||
unixNotice = "$_omp_executable notice"
|
|
||||||
)
|
|
||||||
|
|
||||||
func (f Feature) Bash() Code {
|
func (f Feature) Bash() Code {
|
||||||
switch f {
|
switch f {
|
||||||
case CursorPositioning:
|
case CursorPositioning:
|
||||||
|
@ -22,9 +17,9 @@ func (f Feature) Bash() Code {
|
||||||
case FTCSMarks:
|
case FTCSMarks:
|
||||||
return "_omp_ftcs_marks=1"
|
return "_omp_ftcs_marks=1"
|
||||||
case Upgrade:
|
case Upgrade:
|
||||||
return unixUpgrade
|
return `"$_omp_executable" upgrade`
|
||||||
case Notice:
|
case Notice:
|
||||||
return unixNotice
|
return `"$_omp_executable" notice`
|
||||||
case PromptMark, RPrompt, PoshGit, Azure, LineError, Jobs, Tooltips, Transient:
|
case PromptMark, RPrompt, PoshGit, Azure, LineError, Jobs, Tooltips, Transient:
|
||||||
fallthrough
|
fallthrough
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -11,8 +11,8 @@ func TestBashFeatures(t *testing.T) {
|
||||||
|
|
||||||
want := `// these are the features
|
want := `// these are the features
|
||||||
_omp_ftcs_marks=1
|
_omp_ftcs_marks=1
|
||||||
$_omp_executable upgrade
|
"$_omp_executable" upgrade
|
||||||
$_omp_executable notice
|
"$_omp_executable" notice
|
||||||
_omp_cursor_positioning=1`
|
_omp_cursor_positioning=1`
|
||||||
|
|
||||||
assert.Equal(t, want, got)
|
assert.Equal(t, want, got)
|
||||||
|
|
|
@ -7,6 +7,11 @@ import (
|
||||||
//go:embed scripts/omp.zsh
|
//go:embed scripts/omp.zsh
|
||||||
var zshInit string
|
var zshInit string
|
||||||
|
|
||||||
|
const (
|
||||||
|
unixUpgrade = "$_omp_executable upgrade"
|
||||||
|
unixNotice = "$_omp_executable notice"
|
||||||
|
)
|
||||||
|
|
||||||
func (f Feature) Zsh() Code {
|
func (f Feature) Zsh() Code {
|
||||||
switch f {
|
switch f {
|
||||||
case CursorPositioning:
|
case CursorPositioning:
|
||||||
|
|
Loading…
Reference in a new issue