sm-sorcery-bugs AT lists.ibiblio.org
Subject: Bugs for Sorcery are reported here
List archive
[SM-Sorcery-Bugs] [Bug 5583] New: edit_files doesn't work as expected.
- From: bugzilla-daemon AT metalab.unc.edu
- To: sm-sorcery-bugs AT lists.ibiblio.org
- Subject: [SM-Sorcery-Bugs] [Bug 5583] New: edit_files doesn't work as expected.
- Date: Fri, 23 Jan 2004 08:21:45 -0500
http://bugs.sourcemage.org/show_bug.cgi?id=5583
Summary: edit_files doesn't work as expected.
Product: Sorcery
Version: 1.x Series
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P2
Component: subroutines
AssignedTo: sm-sorcery-bugs AT lists.ibiblio.org
ReportedBy: wandre.l AT free.fr
in /var/lib/sorcery/modules/libmisc, line 283 :
function edit_file() {
${EDITOR:-nano -w} $1
}
in advanced bash scripting guide:
${string:position}
Extracts substring from $string at $position.
If the $string parameter is "*" or "@", then this extracts the positional
parameters, [1] starting at $position.
${string:position:length}
Extracts $length characters of substring from $string at $position.
so i don't really understand how such a thing can work, moreover it do not
work
properly.
i propose to replace the code with:
function edit_file() {
if [ -z $EDITOR ]
then
EDITOR=nano # or whatever else
fi
$EDITOR $1
}
thanks.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
- [SM-Sorcery-Bugs] [Bug 5583] New: edit_files doesn't work as expected., bugzilla-daemon, 01/23/2004
Archive powered by MHonArc 2.6.24.