Minor fix + add some examples.
This commit is contained in:
parent
3cf325d4aa
commit
00d9c3916c
2 changed files with 65 additions and 4 deletions
|
@ -170,9 +170,10 @@ revers_str() {
|
|||
try() {
|
||||
local f="$@"
|
||||
local cmd=$(cat -)
|
||||
ret="$(2>&1 $cmd)"
|
||||
local status=$?
|
||||
list "$cmd" $status $(list $ret | join \#) | $f
|
||||
local ret=$(2>&1 eval "$cmd"; echo $?)
|
||||
local cnt=$(list $ret | wc -l)
|
||||
local status=$(list $ret | last)
|
||||
list "$cmd" $status $(list $ret | take $((cnt - 1)) | join \#) | $f
|
||||
}
|
||||
|
||||
ret() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue