Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: About insert-last-word and "command args | less"
- X-seq: zsh-users 10874
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: About insert-last-word and "command args | less"
- Date: Sat, 14 Oct 2006 14:27:41 -0700
- In-reply-to: <20061014115617.GA28997@xxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20061014115617.GA28997@xxxxxxxxxxxxxxxxxxx>
On Oct 14, 1:56pm, Vincent Lefevre wrote:
}
} I often do something like
}
} svn log file | m
}
} (where m is an alias for less). But when I use insert-last-word, I get
} the "m" instead of "file". Is there a way to ignore the one-character
} words?
Use smart-insert-last-word.
autoload -U smart-insert-last-word
zle -N insert-last-word smart-insert-last-word
zstyle :insert-last-word match '*[[:alnum:]]*[[:alnum:]]*'
That example says that a word must contain at least two alphanumeric
characters, so neither 'm' nor '|' qualifies and "file" is inserted.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author