5

I have installed NixOS 18.03.

Bash seems to add a newline after every command.

$ echo Hello, world!
Hello, world!

$

Why is this? How can I stop it??

2 Answers2

3

Technically, it adds a newline before the prompt by default, by setting

PS1="\n\[\033[$PROMPT_COLOR\][\u@\h:\w]\\$\[\033[0m\] "

You can set a more reasonable prompt by configuring the option programs.bash.promptInit.

robx
  • 2,221
  • 1
  • 14
  • 31
2

It's the default prompt in NixOS, it will always append newline a the end.

PS1="$ "
chepner
  • 497,756
  • 71
  • 530
  • 681
iElectric
  • 5,633
  • 1
  • 29
  • 31