[asterisk-bugs] [Asterisk 0015929]: [patch] CLI to honor user's ~/.editrc file
Asterisk Bug Tracker
noreply at bugs.digium.com
Thu May 5 16:20:03 CDT 2011
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=15929
======================================================================
Reported By: kkm
Assigned To: seanbright
======================================================================
Project: Asterisk
Issue ID: 15929
Category: General
Reproducibility: N/A
Severity: feature
Priority: normal
Status: assigned
Target Version: Feature Tracker
Asterisk Version: SVN
JIRA: SWP-949
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2009-09-22 03:25 CDT
Last Modified: 2011-05-05 16:20 CDT
======================================================================
Summary: [patch] CLI to honor user's ~/.editrc file
Description:
Asterisk CLI ignores command line keybinding file ~/.editrc. By default,
Home, End and Delete keys are not bound to meaningful commands. The
attached simple patch fixes that, in such a way that:
1. If the environment variable EDITRC is set, it is taken to point to an
alternative bindings file.
2. Otherwise, if HOME is set, the file is looked up in ${HOME}/.editrc
If exists, the file is processed by the editline library el_source()
function.
The following sample .editrc file binds Home and End to move to the
beginning and end of command line respectively, Delete to delete character
right, and C-left and C-right to move by word:
bind \\e[3~ ed-delete-next-char
bind \\e[1~ ed-move-to-beg
bind \\e[4~ ed-move-to-end
bind \\eOC vi-next-space-word
bind \\eOD vi-prev-space-word
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0017039 [patch] allow using system copy of libedit
======================================================================
----------------------------------------------------------------------
(0134542) svnbot (reporter) - 2011-05-05 16:20
https://issues.asterisk.org/view.php?id=15929#c134542
----------------------------------------------------------------------
Repository: asterisk
Revision: 317395
U trunk/main/asterisk.c
------------------------------------------------------------------------
r317395 | seanbright | 2011-05-05 16:20:01 -0500 (Thu, 05 May 2011) | 16
lines
Add some new editline bindings by default, and allow for user specified
configuration.
I excluded the part of this patch that used the HOME environment variable
since
the built-in editline library goes to great lengths to disallow that.
Instead
only settings the EDITRC environment variable will use a user specified
file.
Also, the default environment variable use to determine the edit more is
AST_EDITMODE instead of AST_EDITOR (although the latter is still
supported).
(closes issue https://issues.asterisk.org/view.php?id=15929)
Reported by: kkm
Patches:
astcli-editrc-v2.diff uploaded by kkm (license 888)
015929-astcli-editrc-trunk.240324.diff uploaded by kkm (license 888)
Tested by: seanbright
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=317395
Issue History
Date Modified Username Field Change
======================================================================
2011-05-05 16:20 svnbot Checkin
2011-05-05 16:20 svnbot Note Added: 0134542
======================================================================
More information about the asterisk-bugs
mailing list