fixes
This commit is contained in:
parent
e8dfd1b98a
commit
6eaab0b75f
1 changed files with 3 additions and 2 deletions
|
@ -49,13 +49,14 @@ esac
|
||||||
# prompt
|
# prompt
|
||||||
|
|
||||||
ps1() {
|
ps1() {
|
||||||
local date host id
|
local date host id type
|
||||||
local code="${1}"
|
local code="${1}"
|
||||||
date="$(date +%H:%M:%S)"
|
date="$(date +%H:%M:%S)"
|
||||||
local git
|
local git
|
||||||
host="$(hostname)"
|
host="$(hostname)"
|
||||||
id="$(id --user)"
|
id="$(id --user)"
|
||||||
local path="${PWD}"
|
local path="${PWD}"
|
||||||
|
type="$(type -t __git_ps1)"
|
||||||
local user="${USER}"
|
local user="${USER}"
|
||||||
local view="└ "
|
local view="└ "
|
||||||
# code
|
# code
|
||||||
|
@ -69,7 +70,7 @@ ps1() {
|
||||||
view="${view}${SH_DEFAULT} @ "
|
view="${view}${SH_DEFAULT} @ "
|
||||||
view="${view}${SH_BROWN}${date}"
|
view="${view}${SH_BROWN}${date}"
|
||||||
# git
|
# git
|
||||||
if [ "$(type -t __git_ps1)" = "function" ]; then
|
if [ "${type}" = "function" ]; then
|
||||||
git="$(__git_ps1)"
|
git="$(__git_ps1)"
|
||||||
if [ -n "${git}" ]; then
|
if [ -n "${git}" ]; then
|
||||||
view="${view}${SH_DEFAULT} –${SH_MAGENTA}${git}"
|
view="${view}${SH_DEFAULT} –${SH_MAGENTA}${git}"
|
||||||
|
|
Loading…
Reference in a new issue