[Bug 234123] Re: Cannot use "edit" command inside lftp
Launchpad Bug Tracker
234123 at bugs.launchpad.net
Fri Aug 16 04:17:18 UTC 2013
[Expired for lftp (Ubuntu) because there has been no activity for 60
days.]
** Changed in: lftp (Ubuntu)
Status: Incomplete => Expired
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to lftp in Ubuntu.
https://bugs.launchpad.net/bugs/234123
Title:
Cannot use "edit" command inside lftp
Status in “lftp” package in Ubuntu:
Expired
Bug description:
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.$$*;"'
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lftp/+bug/234123/+subscriptions
More information about the foundations-bugs
mailing list