Skip to content

Commit

Permalink
update for latest V 0.4.2 8d98a21 ; fix ve on macos (do not use an …
Browse files Browse the repository at this point in the history
…explict --socket-name= option, since the paths are different)
  • Loading branch information
spytheman committed Oct 2, 2023
1 parent 65cc94f commit 7a4f691
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions veditline.v
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ 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 {
aliases_names := os.args[1..].filter(!it.starts_with('-'))
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
}
Expand Down Expand Up @@ -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)!
}

0 comments on commit 7a4f691

Please sign in to comment.