mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-05-24 16:38:41 +00:00
normalize this case stuff
This commit is contained in:
parent
48be7f8718
commit
20d5cd73f9
1 changed files with 18 additions and 15 deletions
33
zshrc
33
zshrc
|
@ -241,7 +241,7 @@ preexec()
|
||||||
else
|
else
|
||||||
title "${cmd[2,-1]#%}" "$termtitle ${cmd[2,-1]#%}"
|
title "${cmd[2,-1]#%}" "$termtitle ${cmd[2,-1]#%}"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
%*)
|
%*)
|
||||||
title "${jobtexts[${cmd[1]#%}]% *}" "$termtitle $jobtexts[${cmd[1]#%}]"
|
title "${jobtexts[${cmd[1]#%}]% *}" "$termtitle $jobtexts[${cmd[1]#%}]"
|
||||||
;;
|
;;
|
||||||
|
@ -250,29 +250,32 @@ preexec()
|
||||||
# If the command is 'exec', drop that, because
|
# If the command is 'exec', drop that, because
|
||||||
# we'd rather just see the command that is being
|
# we'd rather just see the command that is being
|
||||||
# exec'd. Note the ;& to fall through the next entry.
|
# exec'd. Note the ;& to fall through the next entry.
|
||||||
;&
|
;&
|
||||||
*=*)
|
*=*)
|
||||||
shift cmd
|
shift cmd
|
||||||
;&
|
;&
|
||||||
*)
|
*)
|
||||||
title $cmd[1]:t "$termtitle $cmd[*]" # Starting a new job.
|
title $cmd[1]:t "$termtitle $cmd[*]" # Starting a new job.
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
function title
|
function title
|
||||||
{
|
{
|
||||||
if [[ $TERM == screen* ]]; then
|
case $TERM in
|
||||||
# Use these two for GNU Screen:
|
screen*)
|
||||||
print -nR $'\ek'$1$'\e'"\\"
|
# Use these two for GNU Screen:
|
||||||
shift
|
print -nR $'\ek'$1$'\e'"\\"
|
||||||
# print -nR $'\e]0;'$*$'\a'
|
shift
|
||||||
print -nR $'\e_screen \005 | '$*$'\e'"\\"
|
# print -nR $'\e]0;'$*$'\a'
|
||||||
elif [[ $TERM == xterm* || $TERM == rxvt* ]]; then
|
print -nR $'\e_screen \005 | '$*$'\e'"\\"
|
||||||
# Use this one instead for XTerms:
|
;;
|
||||||
shift
|
xterm*|rxvt*|cygwin)
|
||||||
print -nR $'\e]0;'$@$'\a'
|
# Use this one instead for XTerms:
|
||||||
fi
|
shift
|
||||||
|
print -nR $'\e]0;'$@$'\a'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
# completion menu
|
# completion menu
|
||||||
|
|
Loading…
Add table
Reference in a new issue