new repository without sensitive information
This commit is contained in:
commit
57fa0afede
51 changed files with 1883 additions and 0 deletions
18
widgets/edit-command-line-tmux
Normal file
18
widgets/edit-command-line-tmux
Normal file
|
@ -0,0 +1,18 @@
|
|||
ECLHEIGHT=${ECLHEIGHT:-5}
|
||||
edit-command-line-tmux() {
|
||||
local tmpfile=${TMPPREFIX:-/tmp/zsh}ecl$$
|
||||
|
||||
print -R - "$PREBUFFER$BUFFER" >$tmpfile
|
||||
exec </dev/tty
|
||||
if [ -n "$TMUX" ] && [ "$UID" -ne 0 ]; then
|
||||
tmux splitw -v -l $ECLHEIGHT "vim -c 'set laststatus=0 showtabline=0 ft=zsh' $tmpfile"
|
||||
pid=$(ps -ef | awk "/[0-9] vim.*${tmpfile:t}/ { print \$2 }")
|
||||
wait_on_pid $pid
|
||||
else
|
||||
${=${VISUAL:-${EDITOR:-vi}}} $tmpfile
|
||||
fi
|
||||
print -Rz - "$(<$tmpfile)"
|
||||
|
||||
command rm -f $tmpfile
|
||||
zle send-break # Force reload from the buffer stack
|
||||
}
|
7
widgets/rationalise-dot
Normal file
7
widgets/rationalise-dot
Normal file
|
@ -0,0 +1,7 @@
|
|||
rationalise-dot() {
|
||||
if [[ $LBUFFER = *.. ]]; then
|
||||
LBUFFER+=/..
|
||||
else
|
||||
LBUFFER+=.
|
||||
fi
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue