summaryrefslogtreecommitdiff
path: root/src/env.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/env.cpp')
-rw-r--r--src/env.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/env.cpp b/src/env.cpp
index bf75c9fa..9f0acbbd 100644
--- a/src/env.cpp
+++ b/src/env.cpp
@@ -400,11 +400,18 @@ QString path()
return get("PATH");
}
-QString addPath(const QString& s)
+QString appendToPath(const QString& s)
{
auto old = path();
- set("PATH", get("PATH") + ";" + s);
- return old;
+ set("PATH", old + ";" + s);
+ return old;
+}
+
+QString prependToPath(const QString& s)
+{
+ auto old = path();
+ set("PATH", s + ";" + old);
+ return old;
}
QString setPath(const QString& s)