kill.c File Reference

The killring. More...

#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <wchar.h>
#include <termios.h>
#include <unistd.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include "fallback.h"
#include "util.h"
#include "wutil.h"
#include "kill.h"
#include "proc.h"
#include "sanity.h"
#include "common.h"
#include "env.h"
#include "exec.h"
#include "halloc.h"
#include "path.h"

Defines

#define KILL_MAX   8192
 Maximum entries in killring.

Functions

static int has_xsel ()
 Test if the xsel command is installed.
static void kill_add_internal (wchar_t *str)
 Add the string to the internal killring.
void kill_add (wchar_t *str)
 Add a string to the top of the killring.
static void kill_remove_node (ll_node_t *n)
 Remove the specified node from the circular list.
static void kill_remove (wchar_t *s)
 Remove first match for specified string from circular list.
void kill_replace (wchar_t *old, wchar_t *new)
 Replace the specified string in the killring.
wchar_t * kill_yank_rotate ()
 Rotate the killring.
static void kill_check_x_buffer ()
 Check the X clipboard.
wchar_t * kill_yank ()
 Paste from the killring.
void kill_sanity_check ()
 Sanity check.
void kill_init ()
 Initialize the killring.
void kill_destroy ()
 Destroy the killring.

Variables

static ll_node_tkill_last = 0
 Last kill string.
static ll_node_tkill_current = 0
 Current kill string.
static wchar_t * cut_buffer = 0
 Contents of the X clipboard, at last time we checked it.


Detailed Description

The killring.

Works like the killring in emacs and readline. The killring is cut and paste with a memory of previous cuts. It supports integration with the X clipboard.


Function Documentation

static void kill_check_x_buffer (  )  [static]

Check the X clipboard.

If it has been changed, add the new clipboard contents to the fish killring.

References al_destroy(), al_foreach(), al_get(), al_get_count(), al_init(), cut_buffer, env_get(), escape(), exec_subshell(), has_xsel(), kill_add_internal(), and wcsdupcat.

Referenced by kill_yank().


Generated on Sun Mar 8 15:46:55 2009 for fish by  doxygen 1.5.6