Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Absolute pathnames similar to expand-cmd-path



On Jan 28, 10:17pm, Peter Stephenson wrote:
} Subject: Re: Absolute pathnames similar to expand-cmd-path
}
} On Thu, 27 Jan 2011 19:53:09 -0800
} Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
} > The following seems to work for me, though sometimes it doesn't leave
} > the cursor where I expect:
} > 
} >     autoload -uZ modify-current-argument
} >     current-argument-absolute-path() {
} >       modify-current-argument '$ARG:a'
} >     }
} >     zle -N current-argument-absolute-path
} 
} Ah, it's magic you want.

No, though I'll take it now that you've offered. :-)  I just expected
the cursor to end up at least as far to the right (within the word)
as it started.

Instead it would do things like move from the right end of a longer
word, to one space to the left of the end of a shorter one.  It was
this extra leftward motion that puzzled me.

-- 



Messages sorted by: Reverse Date, Date, Thread, Author