mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-11-09 18:47:02 +00:00
Revert "bash: fix partial line output"
This caused bash to discard keypresses sent before the prompt rendered
This commit is contained in:
parent
a33e3935a3
commit
3b61bdd6dd
1 changed files with 2 additions and 9 deletions
|
@ -37,20 +37,13 @@ in
|
||||||
environment.systemPackages = [ pkgs.powerline-go ];
|
environment.systemPackages = [ pkgs.powerline-go ];
|
||||||
|
|
||||||
programs.bash.interactiveShellInit = ''
|
programs.bash.interactiveShellInit = ''
|
||||||
function _fix_partial_lines() {
|
|
||||||
# print our own newline if program output doesn't end with one
|
|
||||||
local COL
|
|
||||||
local ROW
|
|
||||||
IFS=';' read -sdR -p $'\e[6n' ROW COL
|
|
||||||
[ "$COL" = "1" ] || echo -e '\e[100m \e[0m'
|
|
||||||
}
|
|
||||||
function _update_ps1() {
|
function _update_ps1() {
|
||||||
local remote=y
|
local remote=y
|
||||||
[ "$XDG_SESSION_TYPE" = "x11" ] && unset remote
|
[ "$XDG_SESSION_TYPE" = "x11" ] && unset remote
|
||||||
[ "$XDG_SESSION_TYPE" = "wayland" ] && unset remote
|
[ "$XDG_SESSION_TYPE" = "wayland" ] && unset remote
|
||||||
PS1="$(powerline-go ${toString cfg.args})"
|
PS1="\n$(powerline-go ${toString cfg.args})"
|
||||||
}
|
}
|
||||||
[ "$TERM" = "linux" ] || PROMPT_COMMAND="_fix_partial_lines; _update_ps1; $PROMPT_COMMAND"
|
[ "$TERM" = "linux" ] || PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue