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
|
||||
;;
|
||||
"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")
|
||||
eval "$args" || true
|
||||
@ -82,7 +90,7 @@ while test -n "$1"; do
|
||||
;;
|
||||
"p")
|
||||
out="$(syntax_h "$content" 2>/dev/null || printf "%s\n" "$content")"
|
||||
printf "%s" "$out" | nl -ba
|
||||
printf "%s\n" "$out" | nl -ba
|
||||
;;
|
||||
"q")
|
||||
if test -n "$(printf "%s\n" "$content" | diff "$1" -)"
|
||||
|
Loading…
Reference in New Issue
Block a user