Public bug reported:
Binary package hint: lftp
Hi,
I'm using LFTP 3.7.1, and the "edit" command doesn't work.
edit is an alias for `eval -f "get $0 -o ~/.lftp/edit.tmp.$$ && shell
\"cp -p ~/.lftp/edit.tmp.$$ ~/.lftp/edit.tmp.$$.orig && $EDITOR
~/.lftp/edit.tmp.$$ && test ~/.lftp/edit.tmp.$$ -nt
~/.lftp/edit.tmp.$$.orig\" && put ~/.lftp/edit.tmp.$$ -o $0; shell rm -f
~/.lftp/edit.tmp.$$*"'
This doesn't work because $EDITOR is empty.
The eval should test for it (test -z $EDITOR), or a script you get from
a site with the execution bit set could be potentially be executed! See:
"$EDITOR ~/.lftp/edit.tmp.$$" ==>"~/.lftp/edit.tmp.$$"
So, we could change the eval to something like (untested):
'eval -f "shell \"test -z \\"$EDITOR\\" && echo \'Variable $EDITOR is
not set.\' && exit -1;\" || get $0 -o ~/.lftp/edit.tmp.$$ && shell \"cp
-p ~/.lftp/edit.tmp.$$ ~/.lftp/edit.tmp.$$.orig && \"$EDITOR\"
~/.lftp/edit.tmp.$$ && test ~/.lftp/edit.tmp.$$ -nt
~/.lftp/edit.tmp.$$.orig\" && put ~/.lftp/edit.tmp.$$ -o $0; shell rm -f
~/.lftp/edit.tmp.$$*;"'
** Affects: lftp (Ubuntu)
Importance: Undecided
Status: New
--
Cannot use "edit" command inside lftp
https://bugs.launchpad.net/bugs/234123
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs