From 7a4f691ae75ecac80e074bb34f14ebb7974a43eb Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Mon, 2 Oct 2023 09:35:57 +0300 Subject: [PATCH] update for latest V 0.4.2 8d98a21 ; fix `ve` on macos (do not use an explict --socket-name= option, since the paths are different) --- veditline.v | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/veditline.v b/veditline.v index 3e34408..d9f20f1 100644 --- a/veditline.v +++ b/veditline.v @@ -3,7 +3,7 @@ import os fn main() { mut final_editor_cmd := os.args[0][1..] if os.args.len < 2 { - eprintln('Usage: `v$final_editor_cmd FILE:LINE: ...`') + eprintln('Usage: `v${final_editor_cmd} FILE:LINE: ...`') exit(1) } if '--install' in os.args { @@ -11,8 +11,8 @@ fn main() { exepath := os.executable() for aname in aliases_names { target := os.join_path('/usr/local/bin', aname) - os.system('sudo rm -f $target') - os.system('sudo ln -s $exepath $target') + os.system('sudo rm -f ${target}') + os.system('sudo ln -s ${exepath} ${target}') } return } @@ -40,7 +40,7 @@ fn main() { } if final_editor_cmd == 'e' { final_editor_cmd = 'emacsclient' - res.insert(0, ['--socket-name=/run/user/1000/emacs/server', "-a=''", '-nw']) + res.insert(0, ["-a=''", '-t', '-r']) } - os.execvp(final_editor_cmd, res) ? + os.execvp(final_editor_cmd, res)! }