Compare commits

5 Commits

Author SHA1 Message Date
28abd79961 bump version 2023-12-07 13:46:34 +01:00
dd14e7ec35 don't show shortcuts in help (clutters it) 2023-12-07 13:43:45 +01:00
T.v.Dein
d2db420837 Merge pull request #25 from TLINDEN/doc/fix-formating
fix pod formatting (fixes #24)
2023-12-05 20:09:42 +01:00
T.v.Dein
b4f53d2dd6 Merge pull request #26 from TLINDEN/feature/add-shortcuts
added a couple of command shortcuts
2023-12-05 20:06:05 +01:00
4c6caa7114 fix pod formatting (fixes #24) 2023-12-04 18:03:58 +01:00
4 changed files with 27 additions and 12 deletions

View File

@@ -520,7 +520,9 @@ func sortcommands(hash Commands) []string {
keys := make([]string, 0, len(hash))
for key := range hash {
keys = append(keys, key)
if len(key) > 1 {
keys = append(keys, key)
}
}
sort.Strings(keys)

View File

@@ -30,7 +30,7 @@ import (
lua "github.com/yuin/gopher-lua"
)
const VERSION string = "2.0.11"
const VERSION string = "2.0.12"
const Usage string = `This is rpn, a reverse polish notation calculator cli.

30
rpn.go
View File

@@ -178,18 +178,28 @@ DESCRIPTION
[no]debug toggle debug output (nodebug turns it off)
[no]showstack show the last 5 items of the stack (noshowtack turns it off)
Show commands: dump display the stack contents hex show last stack item
in hex form (converted to int) history display calculation history vars
show list of variables
Show commands:
Stack manipulation commands: clear clear the whole stack shift remove
the last element of the stack reverse reverse the stack elements swap
exchange the last two stack elements dup duplicate last stack item undo
undo last operation edit edit the stack interactively using vi or
$EDITOR
dump display the stack contents
hex show last stack item in hex form (converted to int)
history display calculation history
vars show list of variables
Other commands: help|? show this message manual show manual
quit|exit|c-d|c-c exit program
Stack manipulation commands:
clear clear the whole stack
shift remove the last element of the stack
reverse reverse the stack elements
swap exchange the last two stack elements
dup duplicate last stack item
undo undo last operation
edit edit the stack interactively using vi or $EDITOR
Other commands:
help|? show this message
manual show manual
quit|exit|c-d|c-c exit program
Register variables:

View File

@@ -186,12 +186,14 @@ Configuration Commands:
[no]showstack show the last 5 items of the stack (noshowtack turns it off)
Show commands:
dump display the stack contents
hex show last stack item in hex form (converted to int)
history display calculation history
vars show list of variables
Stack manipulation commands:
clear clear the whole stack
shift remove the last element of the stack
reverse reverse the stack elements
@@ -201,6 +203,7 @@ Stack manipulation commands:
edit edit the stack interactively using vi or $EDITOR
Other commands:
help|? show this message
manual show manual
quit|exit|c-d|c-c exit program