fix(launcher): use alt screen
This commit is contained in:
parent
3c56e83ac8
commit
4d8f25e42b
1 changed files with 1 additions and 9 deletions
|
@ -97,7 +97,7 @@ func newProgramsKeyMap() *programsKeyMap {
|
|||
// =======================
|
||||
// bubbletea model methods
|
||||
func (m model) Init() tea.Cmd {
|
||||
return nil
|
||||
return tea.EnterAltScreen
|
||||
}
|
||||
|
||||
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
|
@ -314,14 +314,6 @@ func Run(cmd *cobra.Command, args []string) error {
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
// ============
|
||||
// clear screen
|
||||
|
||||
// TODO this feels hacky and should probably be replaced
|
||||
execCmd := exec.Command("clear")
|
||||
execCmd.Stdout = os.Stdout
|
||||
execCmd.Run()
|
||||
|
||||
// ====================================
|
||||
// execute chosen command if one is set
|
||||
if finalModel, ok := finalModel.(model); ok && finalModel.shouldExec != "" {
|
||||
|
|
Loading…
Add table
Reference in a new issue