|
|
|
@ -130,3 +130,34 @@ sudo(){
|
|
|
|
|
command sudo "$@"
|
|
|
|
|
title "$LAST_TITLE"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
vim(){
|
|
|
|
|
local title=""
|
|
|
|
|
#until [ -z "$1" ]; do
|
|
|
|
|
for x in "$@"; do
|
|
|
|
|
case "$x" in
|
|
|
|
|
-*) :
|
|
|
|
|
;;
|
|
|
|
|
+*) :
|
|
|
|
|
;;
|
|
|
|
|
*) title="$title$x "
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
#shift
|
|
|
|
|
done
|
|
|
|
|
local num=10
|
|
|
|
|
[ -f ~/shorttitle ] && num=3
|
|
|
|
|
title="${title//.txt/}"
|
|
|
|
|
#if dpstatus >/dev/null; then
|
|
|
|
|
if echo "$title" | grep -q docs/; then
|
|
|
|
|
title="$(basename "$title")"
|
|
|
|
|
title "d${title:0:$num}"
|
|
|
|
|
else
|
|
|
|
|
title="$(basename "$title")"
|
|
|
|
|
title "${title:0:$num}"
|
|
|
|
|
fi
|
|
|
|
|
#fi
|
|
|
|
|
command vim "$@"
|
|
|
|
|
if dpstatus >/dev/null; then title; fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|