aboutsummaryrefslogtreecommitdiffstats
path: root/builtins/bind.def
diff options
context:
space:
mode:
authorJari Aalto <jari.aalto@cante.net>2002-07-17 14:10:11 +0000
committerJari Aalto <jari.aalto@cante.net>2009-09-12 16:46:55 +0000
commit7117c2d221b2aed4ede8600f6a36b7c1454b4f55 (patch)
treeb792f26ecca68813c51ed5ba2e381790758ef31b /builtins/bind.def
parentf73dda092b33638d2d5e9c35375f687a607b5403 (diff)
downloadandroid_external_bash-7117c2d221b2aed4ede8600f6a36b7c1454b4f55.tar.gz
android_external_bash-7117c2d221b2aed4ede8600f6a36b7c1454b4f55.tar.bz2
android_external_bash-7117c2d221b2aed4ede8600f6a36b7c1454b4f55.zip
Imported from ../bash-2.05b.tar.gz.
Diffstat (limited to 'builtins/bind.def')
-rw-r--r--builtins/bind.def31
1 files changed, 16 insertions, 15 deletions
diff --git a/builtins/bind.def b/builtins/bind.def
index 40c8c9f..ddf5619 100644
--- a/builtins/bind.def
+++ b/builtins/bind.def
@@ -1,7 +1,7 @@
This file is bind.def, from which is created bind.c.
It implements the builtin "bind" in Bash.
-Copyright (C) 1987, 1989, 1991 Free Software Foundation, Inc.
+Copyright (C) 1987-2002 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -26,11 +26,12 @@ $PRODUCES bind.c
$BUILTIN bind
$DEPENDS_ON READLINE
$FUNCTION bind_builtin
-$SHORT_DOC bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function]
-Bind a key sequence to a Readline function, or to a macro. The
-syntax is equivalent to that found in ~/.inputrc, but must be
-passed as a single argument: bind '"\C-x\C-r": re-read-init-file'.
-Arguments we accept:
+$SHORT_DOC bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]
+Bind a key sequence to a Readline function or a macro, or set
+a Readline variable. The non-option argument syntax is equivalent
+to that found in ~/.inputrc, but must be passed as a single argument:
+bind '"\C-x\C-r": re-read-init-file'.
+bind accepts the following options:
-m keymap Use `keymap' as the keymap for the duration of this
command. Acceptable keymap names are emacs,
emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,
@@ -40,8 +41,8 @@ Arguments we accept:
-p List functions and bindings in a form that can be
reused as input.
-r keyseq Remove the binding for KEYSEQ.
- -x keyseq:shell-command Cause SHELL-COMMAND to be executed when KEYSEQ
- is entered.
+ -x keyseq:shell-command Cause SHELL-COMMAND to be executed when
+ KEYSEQ is entered.
-f filename Read key bindings from FILENAME.
-q function-name Query about which keys invoke the named function.
-u function-name Unbind all keys which are bound to the named function.
@@ -49,8 +50,8 @@ Arguments we accept:
-v List variable names and values in a form that can
be reused as input.
-S List key sequences that invoke macros and their values
- -s List key sequences that invoke macros and their values in
- a form that can be reused as input.
+ -s List key sequences that invoke macros and their values
+ in a form that can be reused as input.
$END
#if defined (READLINE)
@@ -227,7 +228,7 @@ bind_builtin (list)
{
if (rl_read_init_file (initfile) != 0)
{
- builtin_error ("cannot read %s: %s", initfile, strerror (errno));
+ builtin_error ("%s: cannot read: %s", initfile, strerror (errno));
BIND_RETURN (EXECUTION_FAILURE);
}
}
@@ -242,7 +243,7 @@ bind_builtin (list)
{
if (rl_set_key (remove_seq, (rl_command_func_t *)NULL, rl_get_keymap ()) != 0)
{
- builtin_error ("cannot unbind %s", remove_seq);
+ builtin_error ("`%s': cannot unbind", remove_seq);
BIND_RETURN (EXECUTION_FAILURE);
}
}
@@ -277,7 +278,7 @@ query_bindings (name)
function = rl_named_function (name);
if (function == 0)
{
- builtin_error ("unknown function name `%s'", name);
+ builtin_error ("`%s': unknown function name", name);
return EXECUTION_FAILURE;
}
@@ -294,7 +295,7 @@ query_bindings (name)
printf ("\"%s\"%s", keyseqs[j], keyseqs[j + 1] ? ", " : ".\n");
if (keyseqs[j])
printf ("...\n");
- free_array (keyseqs);
+ strvec_dispose (keyseqs);
return EXECUTION_SUCCESS;
}
@@ -307,7 +308,7 @@ unbind_command (name)
function = rl_named_function (name);
if (function == 0)
{
- builtin_error ("unknown function name `%s'", name);
+ builtin_error ("`%s': unknown function name", name);
return EXECUTION_FAILURE;
}