On 8/13/06, Jochen Wiedmann <[EMAIL PROTECTED]> wrote:
Hi, is it possible to invoke cygpath as a key binding? For example, if my current command line is tar c:\temp and my cursor is on c:\temp, then it would be nice to convert c:\temp into a Windows path by pressing a certain key.
sadly it would seem that the answer is "no, except with a lot of hacking bash (or rather, readline)" relevant documentation would be the "Readline" section of man bash (readline is the library bash uses to read user input) readline DOES allow for some configuration, but it does not seem to have any option to run external commands to manipulate input, only rather primitive editing, which consists mostly of predefined key actions. a rather silly option (not very useful for you, because it only works for specific commands, and removes normal tab completion) is to set up a programmable completion (a bash feature, see man bash, builtins, complete) that calls cygpath: [EMAIL PROTECTED] complete -C "sh -c 'cygpath --dos \$2' --" justatest [EMAIL PROTECTED] justatest /etc/<tab> [EMAIL PROTECTED] justatest F:\cygwin\etc\ (one could try to make it act like normal completion, except when it seems a path it can convert or thelike, but it doesn't seem very workable) - Joe -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/