aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/editor-for.hh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-02-03 22:42:36 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-02-20 09:45:29 -0500
commit1bd03ad100e8813751b6c08b0c21ae8cf5a9c21d (patch)
tree2e625eda7966d2e10bf7316ae8fa352eaa100b27 /src/libcmd/editor-for.hh
parent57a2e46ee0890093c9882f961d7d95c56d7c0ad5 (diff)
Split out `CmdRepl` and `editorFor`
The REPL itself and the `nix repl` CLI are conceptually different things, and thus deserve to be in different files.
Diffstat (limited to 'src/libcmd/editor-for.hh')
-rw-r--r--src/libcmd/editor-for.hh11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libcmd/editor-for.hh b/src/libcmd/editor-for.hh
new file mode 100644
index 000000000..8fbd08792
--- /dev/null
+++ b/src/libcmd/editor-for.hh
@@ -0,0 +1,11 @@
+#pragma once
+
+#include "types.hh"
+
+namespace nix {
+
+/* Helper function to generate args that invoke $EDITOR on
+ filename:lineno. */
+Strings editorFor(const Path & file, uint32_t line);
+
+}