1. Insert the following content after vim.bashrc
function title() {
if [[ -z "$ORIG" ]]; then
ORIG=$PS1
fi
TITLE="\[\e]2;$*\a\]"
PS1=${ORIG}${TITLE}
}
2, title naming
title 192.168.1.2
1. Insert the following content after vim.bashrc
function title() {
if [[ -z "$ORIG" ]]; then
ORIG=$PS1
fi
TITLE="\[\e]2;$*\a\]"
PS1=${ORIG}${TITLE}
}
2, title naming
title 192.168.1.2