Ticket #4292: 4292a.diff

File 4292a.diff, 3.1 KB (added by Barry Ralphs, 11 years ago)

Patch with description of the command-line arguments in docs/filezilla.man

  • src/interface/cmdline.h

     
    1717    enum t_option
    1818    {
    1919        logontype,
    20         site
     20        site,
     21        local
    2122    };
    2223
    2324    CCommandLine(int argc, wxChar** argv);
  • src/interface/Mainfrm.cpp

     
    25062506        return;
    25072507
    25082508    wxString site;
     2509    wxString local;
    25092510    if (pCommandLine->HasSwitch(CCommandLine::sitemanager))
    25102511    {
    25112512        if (!COptions::Get()->GetOptionVal(OPTION_INTERFACE_SITEMANAGER_ON_STARTUP) != 0)
     
    25292530            delete pData;
    25302531        }
    25312532    }
     2533    else if ((local = pCommandLine->GetOption(CCommandLine::local)) != _T(""))
     2534    {
     2535       
     2536        if (!wxDir::Exists(local))
     2537        {
     2538            wxString str = _("Path not found:");
     2539            str += _T("\n") + local;
     2540            wxMessageBox(str, _("Syntax error in command line"));
     2541            return;
     2542        }
     2543       
     2544        CState *pState = CContextManager::Get()->GetCurrentContext();
     2545        if (!pState)
     2546            return;
     2547           
     2548        pState->SetLocalDir(local);
     2549    }   
     2550   
    25322551
    25332552    wxString param = pCommandLine->GetParameter();
    25342553    if (param != _T(""))
     
    25362555        wxString error;
    25372556
    25382557        CServer server;
    2539 
     2558       
    25402559        wxString logontype = pCommandLine->GetOption(CCommandLine::logontype);
    25412560        if (logontype == _T("ask"))
    25422561            server.SetLogonType(ASK);
  • src/interface/cmdline.cpp

     
    66    m_parser.AddSwitch(_T("h"), _T("help"), _("Shows this help dialog"), wxCMD_LINE_OPTION_HELP);
    77    m_parser.AddSwitch(_T("s"), _T("site-manager"), _("Start with opened Site Manager"));
    88    m_parser.AddOption(_T("c"), _T("site"), _("Connect to specified Site Manager site"));
     9    m_parser.AddOption(_T("a"), _T("local"), _("Starts the local site in the given path"));
    910
    1011    wxString desc = wxString::Format(_("Logontype, can only be used together with FTP URL. Argument has to be either '%s' or '%s'"), _T("ask"), _T("interactive"));
    1112    m_parser.AddOption(_T("l"), _T("logontype"), desc);
     
    5556        if (m_parser.Found(_T("l"), &value))
    5657            return value;
    5758        break;
     59    case local:
     60        if (m_parser.Found(_T("a"), &value))
     61            return value;
     62        break;     
    5863    }
    5964
    6065    return _T("");
  • docs/filezilla.man

     
    99.B filezilla \-h|\-s|\-v
    1010.br
    1111.B filezilla \-c <site>
     12.br
     13.B filezilla \-a <path>
    1214.SH DESCRIPTION
    1315FileZilla is a powerful client for plain FTP, FTP over SSL/TLS (FTPS) and the SSH File Transfer Protocol (SFTP).
    1416.SH OPTIONS
     
    2527nor with URL parameter.
    2628
    2729.TP
     30.B \-a <path>, \-\-local <path>
     31Sets the local site to the given path.
     32Use double quotation for paths with spaces in them.
     33.IP
     34Example: filezilla \-a "C:\My Downloads"
     35
     36.TP
    2837.B \-h, \-\-help
    2938Displays a help dialog listing these commandline options.
    3039