|
@@ -6,7 +6,7 @@ |
|
|
null(){ |
|
|
null(){ |
|
|
"$@" >/dev/null 2>&1 |
|
|
"$@" >/dev/null 2>&1 |
|
|
} |
|
|
} |
|
|
__try_exec(){ |
|
|
|
|
|
|
|
|
__safe_run(){ |
|
|
type $1 >/dev/null 2>&1 && "$@" |
|
|
type $1 >/dev/null 2>&1 && "$@" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -764,15 +764,15 @@ alias dest="gpg_stream de" |
|
|
showinfo(){ |
|
|
showinfo(){ |
|
|
echo "Japanese letters are 表示可能" |
|
|
echo "Japanese letters are 表示可能" |
|
|
|
|
|
|
|
|
__try_exec diskinfo |
|
|
|
|
|
|
|
|
__safe_run diskinfo |
|
|
|
|
|
|
|
|
! isdarwin && test -n "${DISPLAY}" && { |
|
|
! isdarwin && test -n "${DISPLAY}" && { |
|
|
__try_exec xrandr | \grep --color=never ^Screen |
|
|
|
|
|
|
|
|
__safe_run xrandr | \grep --color=never ^Screen |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
iswindows || __try_exec finger $USER |
|
|
|
|
|
LANG=C __try_exec id |
|
|
|
|
|
__try_exec xset q |
|
|
|
|
|
|
|
|
iswindows || __safe_run finger $USER |
|
|
|
|
|
LANG=C __safe_runc id |
|
|
|
|
|
__safe_run xset q |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
x(){ |
|
|
x(){ |
|
@@ -1043,7 +1043,7 @@ GIT_PS1_SHOWUPSTREAM=t |
|
|
__my_ps1_git(){ |
|
|
__my_ps1_git(){ |
|
|
null type __git_ps1 || return $last |
|
|
null type __git_ps1 || return $last |
|
|
null git rev-parse --git-dir >/dev/null 2>&1 || return $last |
|
|
null git rev-parse --git-dir >/dev/null 2>&1 || return $last |
|
|
__git_ps1 "[GIT:$(__try_exec git config --get user.name):%s]" |
|
|
|
|
|
|
|
|
__git_ps1 "[GIT:$(__safe_run git config --get user.name):%s]" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
__my_ps1_ipaddr(){ |
|
|
__my_ps1_ipaddr(){ |
|
|