This was an experiment that only partially succeed:
In the simplest case `screen` changes the caption
to the name of the current program; but it doesn't see programs
that run deeper like programs started under `mc` or `vim`.
deflogin on
shell -$SHELL
+# For this to work PS1 prompt must include empty "<esc>k<esc>\" sequence
+# and ends with "$ ".
+#shelltitle "\$ |$SHELL"
+#bind R screen -t '# |root:' sudo su -
+
# define a bigger scrollback, default is 100 lines
defscrollback 1024
OPS1+="\$(prompt_git)"
fi
fi
- OPS1+=" \\$\$SHLVL "
+ OPS1+=" \$SHLVL\\$ "
else
- OPS1="\u@\h:\W \\$"
+ OPS1="\u@\h:\W \$SHLVL\\$ "
fi
fi
OPS1+="\$(prompt_git)"
fi
fi
- OPS1+=" \\$\$SHLVL "
+ # This is for .screenrc: shelltitle "\$ |$SHELL"
+ #OPS1+="\[\033k\033\\\\\]"
+ OPS1+=" \$SHLVL\\$ "
export OPS1
}