zsh, bindkeys, and CTRL+X CTRL+E editor

Sadiq Saif sadiq-KzRxrKfdH+/c+919tysfdA at public.gmane.org
Mon Jun 18 20:39:35 UTC 2012


According to the zsh manpage [1], you can use the hash built-in:

hash [ -dfmr ] [ name[=value ] ] ...

hash -f
The `-f' option causes the entire path to be searched, and all the
commands found are added to the hash table.

So, in this case, you would do:

apt-get install foo && hash -f

[1] http://www.cs.elte.hu/zsh-manual/zsh_17.html

On Mon, Jun 18, 2012 at 4:32 PM, Jamon Camisso
<jamon.camisso-H217xnMUJC0sA/PxXw9srA at public.gmane.org> wrote:
> On 18/06/12 03:14 PM, Sadiq Saif wrote:
>> This is how you do it:
>>
>> autoload -U edit-command-line
>> zle -N edit-command-line
>> bindkey '^x^e' edit-command-line
>>
>> That should bring up $EDITOR when Ctrl-x Ctrl-e is pressed.
>
> Brilliant, thanks for that. I hadn't done the autoload part and was just
> messing with bindkeys. Working nicely now.
>
> On another note, any idea how to make zsh update it's built in list of
> autocomplete program names when something new is installed? For example,
> apt-get install foo. Attempting to tab-complete 'foo' always results in
> a not found message until I source ~/.zshrc. Very annoying.
>
> In any case, thanks again! Jamon
> --
> The Toronto Linux Users Group.      Meetings: http://gtalug.org/
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists



-- 
Sadiq S
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list