3 Commits

Author SHA1 Message Date
ed7ab15a1e do error checking 2023-12-04 13:52:09 +01:00
91fac6d160 added help comment 2023-12-04 13:44:19 +01:00
a33a76bb06 add edit feature 2023-12-04 13:35:40 +01:00
4 changed files with 6 additions and 45 deletions

16
calc.go
View File

@@ -121,27 +121,19 @@ func (c *Calc) GetCompleteCustomFuncalls() func(string) []string {
}
for command := range c.SettingsCommands {
if len(command) > 1 {
completions = append(completions, command)
}
completions = append(completions, command)
}
for command := range c.ShowCommands {
if len(command) > 1 {
completions = append(completions, command)
}
completions = append(completions, command)
}
for command := range c.StackCommands {
if len(command) > 1 {
completions = append(completions, command)
}
completions = append(completions, command)
}
for command := range c.Commands {
if len(command) > 1 {
completions = append(completions, command)
}
completions = append(completions, command)
}
return completions

View File

@@ -305,15 +305,6 @@ func (c *Calc) SetCommands() {
// aliases
c.Commands["quit"] = c.Commands["exit"]
c.SettingsCommands["d"] = c.SettingsCommands["debug"]
c.SettingsCommands["b"] = c.SettingsCommands["batch"]
c.SettingsCommands["s"] = c.SettingsCommands["showstack"]
c.ShowCommands["h"] = c.ShowCommands["history"]
c.ShowCommands["p"] = c.ShowCommands["dump"]
c.ShowCommands["v"] = c.ShowCommands["vars"]
c.StackCommands["c"] = c.StackCommands["clear"]
c.StackCommands["u"] = c.StackCommands["undo"]
c.SettingsCommands["undebug"] = c.SettingsCommands["nodebug"]
c.SettingsCommands["show"] = c.SettingsCommands["showstack"]
}

11
rpn.go
View File

@@ -198,17 +198,6 @@ DESCRIPTION
Refer to https://pkg.go.dev/math for details about those functions.
There are also a number of shortcuts for some commands available:
d debug
b batch
s showstack
h history
p dump (aka print)
v vars
c clear
u undo
INTERACTIVE REPL
While you can use rpn in the command-line, the best experience you'll
have is the interactive repl (read eval print loop). Just execute "rpn"

11
rpn.pod
View File

@@ -213,17 +213,6 @@ Register variables:
Refer to https://pkg.go.dev/math for details about those functions.
There are also a number of shortcuts for some commands available:
d debug
b batch
s showstack
h history
p dump (aka print)
v vars
c clear
u undo
=head1 INTERACTIVE REPL
While you can use rpn in the command-line, the best experience you'll