Re: [lftp] [Enhancement] Option to specify config file

2016-04-29 Thread Alexander V. Lukyanov
On Fri, Apr 29, 2016 at 10:52:28AM +0200, Franck Eyraud wrote:
> I suggest that your solution is in your other email, and is the one I used
> for years :
>
> One dir for each server, or group of servers, with specific config
> (.lftp/rc, .lftprc and even .netrc), and set HOME to this dir before
> launching lftp.
>
> HOME=/path/to/server1 lftp
>
> Or some easy bash script wrapper that runs lftp that way...

There is also LFTP_HOME environment variable, using it you can avoid the
extra .lftp subdirectory (or XDG .local and .config).

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] [Enhancement] Option to specify config file

2016-04-29 Thread Franck Eyraud

Hi Juan,

I suggest that your solution is in your other email, and is the one I 
used for years :


One dir for each server, or group of servers, with specific config 
(.lftp/rc, .lftprc and even .netrc), and set HOME to this dir before 
launching lftp.


HOME=/path/to/server1 lftp

Or some easy bash script wrapper that runs lftp that way...

Franck

Le 29/04/2016 10:38, Juan Simón a écrit :

ok, but it's less clean that specify a config file for every FTP
server, by other side, I have several alias with same name but
different behaviour in every FTP server, can I define these alias in
same config file with same name with those closures?


That's what closures were made for. For example: set ftp:sync-mode/ftp.onesite.com yes set 
ftp:sync-mode/ftp.another.org no set net:timeout/*.domain.net 30 -- Alexander.   1. 
The 'lftp -h' doesn't show this option.   2. In man file the options of 
lftp command are near the end, when I

___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] [Enhancement] Option to specify config file

2016-04-29 Thread Alexander V. Lukyanov
On Fri, Apr 29, 2016 at 09:37:27AM +0200, Juan Simón wrote:
> Actually I connect to several FTP servers and I would like define
> configuration rules different for each one. How can I do this?

That's what closures were made for.

For example:

   set ftp:sync-mode/ftp.onesite.com yes
   set ftp:sync-mode/ftp.another.org no
   set net:timeout/*.domain.net 30

--
   Alexander.


> 2015-03-18 11:11 GMT+01:00 Juan Simón :
>
> > Ok, that option is just what I wanted. I don't think this option should
> > skip /etc/lftp.conf too. The option name (norc) is quite descriptive
> > about rc (user) file no system file.
> >
> > I didn't find that option because:
> >
> >1. The 'lftp -h' doesn't show this option.
> >
> >>$ lftp -h
> >>Usage: lftp [OPTS] 
> >>`lftp' is the first command executed by lftp after rc files
> >> -fexecute commands from the file and exit
> >> -c execute the commands and exit
> >> --help  print this help and exit
> >> --version   print lftp version and exit
> >>Other options are the same as in `open' command
> >> -e execute the command just after selecting
> >> -u [,]  use the user/password for authentication
> >> -puse the port for connection
> >>   host name, URL or bookmark name
> >>
> >>2. In man file the options of lftp command are near the end, when I
> >think they should be at the beginning.
> >
> >
> > 2015-03-18 8:13 GMT+01:00 Alexander V. Lukyanov :
> >
> >> On Wed, Mar 18, 2015 at 12:49:16AM +0100, Juan Simón wrote:
> >> > It would be great an option to specify a config file different of
> >> default.
> >> > It would be useful another option to indicate to lftp that it doesn't
> >> load
> >> > any config file, that it uses the default values.
> >>
> >> There is "lftp --norc" option, but it currently skips only user-specific
> >> rc
> >> files, and still loads system-wide /etc/lftp.conf
> >>
> >> Probably it should be changed to skip /etc/lftp.conf as well.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] [Enhancement] Option to specify config file

2016-04-29 Thread Juan Simón
Actually I connect to several FTP servers and I would like define
configuration rules different for each one. How can I do this?

2015-03-18 11:11 GMT+01:00 Juan Simón :

> Ok, that option is just what I wanted. I don't think this option should
> skip /etc/lftp.conf too. The option name (norc) is quite descriptive
> about rc (user) file no system file.
>
> I didn't find that option because:
>
>1. The 'lftp -h' doesn't show this option.
>
>>$ lftp -h
>>Usage: lftp [OPTS] 
>>`lftp' is the first command executed by lftp after rc files
>> -fexecute commands from the file and exit
>> -c execute the commands and exit
>> --help  print this help and exit
>> --version   print lftp version and exit
>>Other options are the same as in `open' command
>> -e execute the command just after selecting
>> -u [,]  use the user/password for authentication
>> -puse the port for connection
>>   host name, URL or bookmark name
>>
>>2. In man file the options of lftp command are near the end, when I
>think they should be at the beginning.
>
>
> 2015-03-18 8:13 GMT+01:00 Alexander V. Lukyanov :
>
>> On Wed, Mar 18, 2015 at 12:49:16AM +0100, Juan Simón wrote:
>> > It would be great an option to specify a config file different of
>> default.
>> > It would be useful another option to indicate to lftp that it doesn't
>> load
>> > any config file, that it uses the default values.
>>
>> There is "lftp --norc" option, but it currently skips only user-specific
>> rc
>> files, and still loads system-wide /etc/lftp.conf
>>
>> Probably it should be changed to skip /etc/lftp.conf as well.
>>
>> --
>>Alexander.
>>
>
>
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] [Enhancement] Option to specify config file

2015-03-18 Thread Juan Simón
Ok, that option is just what I wanted. I don't think this option should
skip /etc/lftp.conf too. The option name (norc) is quite descriptive about
rc (user) file no system file.

I didn't find that option because:

   1. The 'lftp -h' doesn't show this option.

$ lftp -h
Usage: lftp [OPTS] site
`lftp' is the first command executed by lftp after rc files
 -f file   execute commands from the file and exit
 -c cmdexecute the commands and exit
 --help  print this help and exit
 --version   print lftp version and exit
Other options are the same as in `open' command
 -e cmdexecute the command just after selecting
 -u user[,pass]  use the user/password for authentication
 -p port   use the port for connection
 site  host name, URL or bookmark name

2. In man file the options of lftp command are near the end, when I
   think they should be at the beginning.


2015-03-18 8:13 GMT+01:00 Alexander V. Lukyanov l...@netis.ru:

 On Wed, Mar 18, 2015 at 12:49:16AM +0100, Juan Simón wrote:
  It would be great an option to specify a config file different of
 default.
  It would be useful another option to indicate to lftp that it doesn't
 load
  any config file, that it uses the default values.

 There is lftp --norc option, but it currently skips only user-specific rc
 files, and still loads system-wide /etc/lftp.conf

 Probably it should be changed to skip /etc/lftp.conf as well.

 --
Alexander.

___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] [Enhancement] Option to specify config file

2015-03-18 Thread Alexander V. Lukyanov
On Wed, Mar 18, 2015 at 12:49:16AM +0100, Juan Simón wrote:
 It would be great an option to specify a config file different of default.
 It would be useful another option to indicate to lftp that it doesn't load
 any config file, that it uses the default values.

There is lftp --norc option, but it currently skips only user-specific rc
files, and still loads system-wide /etc/lftp.conf

Probably it should be changed to skip /etc/lftp.conf as well.

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp