améliorer affichage p
This commit is contained in:
parent
c99f80b52a
commit
45528e1e08
8
bin/p
8
bin/p
@ -7,7 +7,9 @@ function git_status() {
|
|||||||
local status r cwd
|
local status r cwd
|
||||||
status="$(git -c color.status=always status "$@" 2>&1)"; r=$?
|
status="$(git -c color.status=always status "$@" 2>&1)"; r=$?
|
||||||
if [ -n "$status" ]; then
|
if [ -n "$status" ]; then
|
||||||
setx cwd=ppath2 "$(pwd)" "$OrigCwd"
|
cwd="$Cwd"
|
||||||
|
[ -n "$cwd" ] || cwd="$(pwd)"
|
||||||
|
setx cwd=ppath2 "$cwd" "$OrigCwd"
|
||||||
etitle "$cwd"
|
etitle "$cwd"
|
||||||
if [ $r -eq 0 ]; then
|
if [ $r -eq 0 ]; then
|
||||||
echo "$status"
|
echo "$status"
|
||||||
@ -35,6 +37,7 @@ if [ -n "$chdir" ]; then
|
|||||||
cd "$chdir" || die
|
cd "$chdir" || die
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Cwd=
|
||||||
if [ -n "$all" ]; then
|
if [ -n "$all" ]; then
|
||||||
# liste de sous répertoires
|
# liste de sous répertoires
|
||||||
if [ $# -gt 0 ]; then
|
if [ $# -gt 0 ]; then
|
||||||
@ -55,6 +58,9 @@ if [ -n "$all" ]; then
|
|||||||
done
|
done
|
||||||
else
|
else
|
||||||
# répertoire courant uniquement
|
# répertoire courant uniquement
|
||||||
|
setx toplevel=git_get_toplevel
|
||||||
|
[ -n "$toplevel" ] && Cwd="$toplevel"
|
||||||
|
|
||||||
args=()
|
args=()
|
||||||
isatty || args+=(--porcelain)
|
isatty || args+=(--porcelain)
|
||||||
git_status "${args[@]}"
|
git_status "${args[@]}"
|
||||||
|
Reference in New Issue
Block a user