IssueRaiser

Empty line when opening terminal

## Bug Report #### Current Behavior When `add_line` is enabled a new line is added at the beginning of every new terminal window/tab. #### Expected Behavior Using `add_line` should not add a new line above the first line of every window / tab. #### Additional context/Screenshots <img width="836" alt="new-line" src="https://user-images.githubusercontent.com/491949/67129751-beb50680-f1ff-11e9-82f4-c1fef2b8ddbb.png"> #### Environment - Starship version: starship 0.25.0 - Shell type: zsh - Shell version: zsh 5.3 (x86_64-apple-darwin18.0) - Shell plugin manager: antibody - Terminal emulator: iTerm2 - Operating system: OSX 10.14.6 #### Relevant Shell Configuration ``` eval "$(starship init zsh)" source <(antibody init) antibody bundle < ~/.zsh_plugins.txt ``` #### Starship Configuration ``` add_newline = true ``` #### Possible Solution ``` if config.add_newline { writeln!(buf).unwrap(); } ``` The above if-statement from https://github.com/starship/starship/blob/master/src/print.rs#L23 could be changed into something inspired by Spaceship's solution: https://github.com/maximbaz/spaceship-prompt/commit/815b68c70f21c5512765c87985897b98b8ed232c found in https://github.com/denysdovhan/spaceship-prompt/issues/462

Posted by martensjostrand on Oct 18, 2019, 9:45 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments

github (Software)

Empty line when opening terminal

martensjostrandOct 18, 2019, 9:45 PM

## Bug Report #### Current Behavior When `add_line` is enabled a new line is added at the beginning of every new terminal window/tab. #### Expected Behavior Using `add_line` should not add a new line above the first line of every window / tab. #### Additional context/Screenshots <img width="836" alt="new-line" src="https://user-images.githubusercontent.com/491949/67129751-beb50680-f1ff-11e9-82f4-c1fef2b8ddbb.png"> #### Environment - Starship version: starship 0.25.0 - Shell type: zsh - Shell version: zsh 5.3 (x86_64-apple-darwin18.0) - Shell plugin manager: antibody - Terminal emulator: iTerm2 - Operating system: OSX 10.14.6 #### Relevant Shell Configuration ``` eval "$(starship init zsh)" source <(antibody init) antibody bundle < ~/.zsh_plugins.txt ``` #### Starship Configuration ``` add_newline = true ``` #### Possible Solution ``` if config.add_newline { writeln!(buf).unwrap(); } ``` The above if-statement from https://github.com/starship/starship/blob/master/src/print.rs#L23 could be changed into something inspired by Spaceship's solution: https://github.com/maximbaz/spaceship-prompt/commit/815b68c70f21c5512765c87985897b98b8ed232c found in https://github.com/denysdovhan/spaceship-prompt/issues/462

Comments (0)

No comments yet. Start the discussion.

Comment on this issue