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
|
||||
var bashInit string
|
||||
|
||||
const (
|
||||
unixUpgrade = "$_omp_executable upgrade"
|
||||
unixNotice = "$_omp_executable notice"
|
||||
)
|
||||
|
||||
func (f Feature) Bash() Code {
|
||||
switch f {
|
||||
case CursorPositioning:
|
||||
|
@ -22,9 +17,9 @@ func (f Feature) Bash() Code {
|
|||
case FTCSMarks:
|
||||
return "_omp_ftcs_marks=1"
|
||||
case Upgrade:
|
||||
return unixUpgrade
|
||||
return `"$_omp_executable" upgrade`
|
||||
case Notice:
|
||||
return unixNotice
|
||||
return `"$_omp_executable" notice`
|
||||
case PromptMark, RPrompt, PoshGit, Azure, LineError, Jobs, Tooltips, Transient:
|
||||
fallthrough
|
||||
default:
|
||||
|
|
|
@ -11,8 +11,8 @@ func TestBashFeatures(t *testing.T) {
|
|||
|
||||
want := `// these are the features
|
||||
_omp_ftcs_marks=1
|
||||
$_omp_executable upgrade
|
||||
$_omp_executable notice
|
||||
"$_omp_executable" upgrade
|
||||
"$_omp_executable" notice
|
||||
_omp_cursor_positioning=1`
|
||||
|
||||
assert.Equal(t, want, got)
|
||||
|
|
|
@ -7,6 +7,11 @@ import (
|
|||
//go:embed scripts/omp.zsh
|
||||
var zshInit string
|
||||
|
||||
const (
|
||||
unixUpgrade = "$_omp_executable upgrade"
|
||||
unixNotice = "$_omp_executable notice"
|
||||
)
|
||||
|
||||
func (f Feature) Zsh() Code {
|
||||
switch f {
|
||||
case CursorPositioning:
|
||||
|
|
Loading…
Reference in a new issue