mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-08-31 22:08:34 +00:00
- we consider a word to be alphanumeric for moving on the command line
- make the new title thing work better, it is not flawless but not too bad
This commit is contained in:
parent
65101e92c6
commit
26342e882a
1 changed files with 6 additions and 1 deletions
7
zshrc
7
zshrc
|
@ -16,6 +16,9 @@ fi
|
||||||
autoload -U edit-command-line
|
autoload -U edit-command-line
|
||||||
zle -N edit-command-line
|
zle -N edit-command-line
|
||||||
|
|
||||||
|
# only alphanumeric chars for moving around
|
||||||
|
WORDCHARS=''
|
||||||
|
|
||||||
# disable core dumps
|
# disable core dumps
|
||||||
limit coredumpsize 0
|
limit coredumpsize 0
|
||||||
|
|
||||||
|
@ -216,11 +219,13 @@ preexec()
|
||||||
# Old approach: cmd=(builtin jobs -l %+)
|
# Old approach: cmd=(builtin jobs -l %+)
|
||||||
# weakness: shows a load of bs
|
# weakness: shows a load of bs
|
||||||
title ${jobtexts[${(k)jobstates[(R)*+*]}]%% *} "$termtitle ${jobtexts[${(k)jobstates[(R)*+*]}]}"
|
title ${jobtexts[${(k)jobstates[(R)*+*]}]%% *} "$termtitle ${jobtexts[${(k)jobstates[(R)*+*]}]}"
|
||||||
else
|
elif (( $#cmd == 2 )); then
|
||||||
# Replace the command name, ignore extra args.
|
# Replace the command name, ignore extra args.
|
||||||
# Old approach: cmd=(builtin jobs -l ${(Q)cmd[2]})
|
# Old approach: cmd=(builtin jobs -l ${(Q)cmd[2]})
|
||||||
# weakness: shows all matching jobs on the title, not just one
|
# weakness: shows all matching jobs on the title, not just one
|
||||||
title "${jobtexts[${cmd[2]#%}]%% *}" "$termtitle $jobtexts[${cmd[2]#%}]"
|
title "${jobtexts[${cmd[2]#%}]%% *}" "$termtitle $jobtexts[${cmd[2]#%}]"
|
||||||
|
else
|
||||||
|
title "${cmd[2,-1]#%}" "$termtitle ${cmd[2,-1]#%}"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
%*)
|
%*)
|
||||||
|
|
Loading…
Add table
Reference in a new issue