Skip to content
Snippets Groups Projects
CommandLine.cpp 38.1 KiB
Newer Older
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#endif
      else {
        Msg::Error("Unknown option '%s'", argv[i]);
        PrintUsage(argv[0]);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    }
      CTX::instance()->files.push_back(argv[i++]);
  if(CTX::instance()->files.empty()){
    std::string base = (getenv("PWD") ? "" : CTX::instance()->homeDir);
    GModel::current()->setFileName(base + CTX::instance()->defaultFileName);
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
  else
    GModel::current()->setFileName(CTX::instance()->files[0]);
  CTX::instance()->terminal = terminal;