pasting from clipboard in bash

Fergus Henderson fjh@cs.mu.OZ.AU
Thu Mar 27 14:38:00 GMT 1997


Chuck Bogorad, you wrote:
> 
> i've always wanted to be able to press insert and get first line from the 
> clipboard into command line. so here it is. i diff'd (diff -crb) a 'clean' 
> b17.1-bash source (no patches applied).
> 
> what it does - you now have one more function available for bindng - 
> 'paste-from-clipboard'. i mapped it to INSERT:
> 
> > bind '"\e[2~":paste-from-clipboard'

You should send these changes to the bash maintainer.

> === cut ===
> diff -crb /usr/local/src/bash/cpp-Makefile bash-patched/cpp-Makefile
> *** /usr/local/src/bash/cpp-Makefile   Thu Jan 01 03:02:52 1970
> --- bash-patched/cpp-Makefile   Wed Mar 26 14:03:36 1997
> ***************
> *** 685,691 ****
>          $(GLOB_LIBRARY) $(TILDE_LIBRARY) $(MALLOC_LIBRARY) $(LOCAL_LIBS)
>   #else /* !LD_HAS_NO_DASH_L */
>   LIBRARIES = $(READLINE_LIB) $(HISTORY_LIB) $(TERMCAP_LIB) $(GLOB_LIB) \
> !        $(TILDE_LIB) $(MALLOC_LIB) $(LOCAL_LIBS)
>   #endif /* !LD_HAS_NO_DASH_L */
>   
>   #if defined (READLINE)
> --- 685,691 ----
>          $(GLOB_LIBRARY) $(TILDE_LIBRARY) $(MALLOC_LIBRARY) $(LOCAL_LIBS)
>   #else /* !LD_HAS_NO_DASH_L */
>   LIBRARIES = $(READLINE_LIB) $(HISTORY_LIB) $(TERMCAP_LIB) $(GLOB_LIB) \
> !        $(TILDE_LIB) $(MALLOC_LIB) $(LOCAL_LIBS) -luser32
>   #endif /* !LD_HAS_NO_DASH_L */

That change should be inside `#ifdef __CYGWIN32__' or something like that.

> { "non-incremental-reverse-search-history-again", 
> rl_noninc_reverse_search_again },
> +   { "paste-from-clipboard", rl_paste_from_clipboard },
>     { "possible-completions", rl_possible_completions },

Ditto.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: < http://www.cs.mu.oz.au/~fjh >   |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3         |     -- the last words of T. S. Garp.
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list