Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bash shell #282

Merged
merged 5 commits into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sjef/sjef-customization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void sjef::Project::custom_run_preface() {
sjef::Backend sjef::Project::default_backend() {
if (m_project_suffix == "molpro") {
#ifdef WIN32
auto command = std::string{"'C:/Program\\ Files/Molpro/bin/program_molpro'"};
auto command = std::string{"'C:/Program Files/Molpro/bin/program_molpro'"};
#else
auto command = std::string{"molpro"};
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/sjef/util/Shell.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace sjef::util {
class Shell {

public:
Shell(std::string host, std::string shell = "/bin/sh");
Shell(std::string host, std::string shell = "bash");
Shell() : Shell("localhost") {}
std::string operator()(const std::string& command, bool wait = true, const std::string& directory = ".",
int verbosity = 0, const std::string& out = "/dev/null",
Expand Down
2 changes: 2 additions & 0 deletions src/sjef/util/util.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef SJEF_LIB_UTIL_UTIL_H_
#define SJEF_LIB_UTIL_UTIL_H_
#include <ostream>
#include <regex>

namespace sjef::util {

Expand All @@ -18,6 +19,7 @@ inline std::vector<std::string> splitString(const std::string& input, char c = '
result.emplace_back(begin + 1, str - 1);
else
result.emplace_back(begin, str);
result.back() = std::regex_replace(result.back(),std::regex{" "},"\\ ");
if (result.back().empty())
result.pop_back();
} while (0 != *str++);
Expand Down
Loading