summaryrefslogtreecommitdiffstats
path: root/library/history.tcl
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2003-03-19 21:57:29 (GMT)
committerdgp <dgp@users.sourceforge.net>2003-03-19 21:57:29 (GMT)
commitbb7105fe9e61473e34a6dfa06700dbc252afeb19 (patch)
tree442e8a70c6a7eb9cab94e31ce02f4e195e3956b3 /library/history.tcl
parent2f7a25d9e6cc43c401cbb12b0a35adca9ba526ca (diff)
downloadtcl-bb7105fe9e61473e34a6dfa06700dbc252afeb19.zip
tcl-bb7105fe9e61473e34a6dfa06700dbc252afeb19.tar.gz
tcl-bb7105fe9e61473e34a6dfa06700dbc252afeb19.tar.bz2
* library/auto.tcl: Replaced [regexp] and [regsub] with
* library/history.tcl: [string map] where possible. Thanks * library/ldAout.tcl: to David Welton. [Bugs 667456,667558] * library/safe.tcl: Bumped to http 2.4.3, opt 0.4.5, and * library/http/http.tcl: tcltest 2.2.3. * library/http/pkgIndex.tcl: * library/opt/optparse.tcl: * library/opt/pkgIndex.tcl: * library/tcltest/tcltest.tcl: * library/tcltest/pkgIndex.tcl: * tools/genStubs.tcl: * tools/tcltk-man2html.tcl: * unix/mkLinks.tcl:
Diffstat (limited to 'library/history.tcl')
-rw-r--r--library/history.tcl5
1 files changed, 2 insertions, 3 deletions
diff --git a/library/history.tcl b/library/history.tcl
index d75c354..7304d2a 100644
--- a/library/history.tcl
+++ b/library/history.tcl
@@ -2,7 +2,7 @@
#
# Implementation of the history command.
#
-# RCS: @(#) $Id: history.tcl,v 1.5 2001/05/17 08:18:56 hobbs Exp $
+# RCS: @(#) $Id: history.tcl,v 1.6 2003/03/19 21:57:42 dgp Exp $
#
# Copyright (c) 1997 Sun Microsystems, Inc.
#
@@ -256,8 +256,7 @@ proc history {args} {
if {![info exists history($i)]} {
continue
}
- set cmd [string trimright $history($i) \ \n]
- regsub -all \n $cmd "\n\t" cmd
+ set cmd [string map [list \n \n\t] [string trimright $history($i) \ \n]]
append result $newline[format "%6d %s" $i $cmd]
set newline \n
}