added basic delete
This commit is contained in:
parent
ef4e83c3d3
commit
9242bbfa6c
12
en
12
en
@ -72,7 +72,15 @@ while test -n "$1"; do
|
|||||||
clear
|
clear
|
||||||
;;
|
;;
|
||||||
"d")
|
"d")
|
||||||
printf "%s: d: Command not implemented.\n" "$argv0" 1>&2
|
if test -z "$args"; then
|
||||||
|
printf "%s: %s: Missing argument.\n" "$argv0" "$command" 1>&2
|
||||||
|
else
|
||||||
|
for line in $(printf "%s\n" "$args" | sed 's/,/\n/g')
|
||||||
|
do
|
||||||
|
del="$(printf "%s\n" "$content" | head -n "$line" | tail -n 1)"
|
||||||
|
content="$(printf "%s\n" "$content" | sed -n "/$del/!p")"
|
||||||
|
done
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
"e")
|
"e")
|
||||||
eval "$args" || true
|
eval "$args" || true
|
||||||
@ -82,7 +90,7 @@ while test -n "$1"; do
|
|||||||
;;
|
;;
|
||||||
"p")
|
"p")
|
||||||
out="$(syntax_h "$content" 2>/dev/null || printf "%s\n" "$content")"
|
out="$(syntax_h "$content" 2>/dev/null || printf "%s\n" "$content")"
|
||||||
printf "%s" "$out" | nl -ba
|
printf "%s\n" "$out" | nl -ba
|
||||||
;;
|
;;
|
||||||
"q")
|
"q")
|
||||||
if test -n "$(printf "%s\n" "$content" | diff "$1" -)"
|
if test -n "$(printf "%s\n" "$content" | diff "$1" -)"
|
||||||
|
Loading…
Reference in New Issue
Block a user