mirror of
https://codeberg.org/scip/rpnc.git
synced 2025-12-17 12:31:04 +01:00
Compare commits
5 Commits
feature/ad
...
fix/dont-s
| Author | SHA1 | Date | |
|---|---|---|---|
| 28abd79961 | |||
| dd14e7ec35 | |||
|
|
d2db420837 | ||
|
|
b4f53d2dd6 | ||
| 4c6caa7114 |
4
calc.go
4
calc.go
@@ -520,7 +520,9 @@ func sortcommands(hash Commands) []string {
|
|||||||
keys := make([]string, 0, len(hash))
|
keys := make([]string, 0, len(hash))
|
||||||
|
|
||||||
for key := range hash {
|
for key := range hash {
|
||||||
keys = append(keys, key)
|
if len(key) > 1 {
|
||||||
|
keys = append(keys, key)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sort.Strings(keys)
|
sort.Strings(keys)
|
||||||
|
|||||||
2
main.go
2
main.go
@@ -30,7 +30,7 @@ import (
|
|||||||
lua "github.com/yuin/gopher-lua"
|
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.
|
const Usage string = `This is rpn, a reverse polish notation calculator cli.
|
||||||
|
|
||||||
|
|||||||
30
rpn.go
30
rpn.go
@@ -178,18 +178,28 @@ DESCRIPTION
|
|||||||
[no]debug toggle debug output (nodebug turns it off)
|
[no]debug toggle debug output (nodebug turns it off)
|
||||||
[no]showstack show the last 5 items of the stack (noshowtack 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
|
Show commands:
|
||||||
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
|
dump display the stack contents
|
||||||
the last element of the stack reverse reverse the stack elements swap
|
hex show last stack item in hex form (converted to int)
|
||||||
exchange the last two stack elements dup duplicate last stack item undo
|
history display calculation history
|
||||||
undo last operation edit edit the stack interactively using vi or
|
vars show list of variables
|
||||||
$EDITOR
|
|
||||||
|
|
||||||
Other commands: help|? show this message manual show manual
|
Stack manipulation commands:
|
||||||
quit|exit|c-d|c-c exit program
|
|
||||||
|
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:
|
Register variables:
|
||||||
|
|
||||||
|
|||||||
3
rpn.pod
3
rpn.pod
@@ -186,12 +186,14 @@ Configuration Commands:
|
|||||||
[no]showstack show the last 5 items of the stack (noshowtack turns it off)
|
[no]showstack show the last 5 items of the stack (noshowtack turns it off)
|
||||||
|
|
||||||
Show commands:
|
Show commands:
|
||||||
|
|
||||||
dump display the stack contents
|
dump display the stack contents
|
||||||
hex show last stack item in hex form (converted to int)
|
hex show last stack item in hex form (converted to int)
|
||||||
history display calculation history
|
history display calculation history
|
||||||
vars show list of variables
|
vars show list of variables
|
||||||
|
|
||||||
Stack manipulation commands:
|
Stack manipulation commands:
|
||||||
|
|
||||||
clear clear the whole stack
|
clear clear the whole stack
|
||||||
shift remove the last element of the stack
|
shift remove the last element of the stack
|
||||||
reverse reverse the stack elements
|
reverse reverse the stack elements
|
||||||
@@ -201,6 +203,7 @@ Stack manipulation commands:
|
|||||||
edit edit the stack interactively using vi or $EDITOR
|
edit edit the stack interactively using vi or $EDITOR
|
||||||
|
|
||||||
Other commands:
|
Other commands:
|
||||||
|
|
||||||
help|? show this message
|
help|? show this message
|
||||||
manual show manual
|
manual show manual
|
||||||
quit|exit|c-d|c-c exit program
|
quit|exit|c-d|c-c exit program
|
||||||
|
|||||||
Reference in New Issue
Block a user