projects
/
grml-etc-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
adding -f (force) switch to xtrename
[grml-etc-core.git]
/
etc
/
zsh
/
zshrc
diff --git
a/etc/zsh/zshrc
b/etc/zsh/zshrc
index
67fc640
..
681d1d4
100644
(file)
--- a/
etc/zsh/zshrc
+++ b/
etc/zsh/zshrc
@@
-3840,16
+3840,21
@@
mkmaildir() {
mkdir -p ${root}/${subdir}/{cur,new,tmp}
}
mkdir -p ${root}/${subdir}/{cur,new,tmp}
}
-#
xtrename() rename xterm
from within GNU-screen
+#
f5# Change the xterm title
from within GNU-screen
xtrename() {
xtrename() {
- if [[ -z ${DISPLAY} ]] ; then
- printf 'xtrename only makes sense in X11.\n'
- return 1
+ if [[ ${1} != "-f" ]] ; then
+ if [[ -z ${DISPLAY} ]] ; then
+ printf 'xtrename only makes sense in X11.\n'
+ return 1
+ fi
+ else
+ shift
fi
if [[ -z ${1} ]] ; then
fi
if [[ -z ${1} ]] ; then
- printf 'usage: xtrename
()
"title for xterm"\n'
+ printf 'usage: xtrename
[-f]
"title for xterm"\n'
printf ' renames the title of xterm from _within_ screen.\n'
printf ' renames the title of xterm from _within_ screen.\n'
- printf ' Also works without screen.\n'
+ printf ' also works without screen.\n'
+ printf ' will not work if DISPLAY is unset, use -f to override.\n'
return 0
fi
print -n "\eP\e]0;${1}\C-G\e\\"
return 0
fi
print -n "\eP\e]0;${1}\C-G\e\\"