From 1c5184528eb436e0775a59cdcd6aa64744f36c9a Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 20 Jul 2009 18:08:52 +0200 Subject: added an easy "edit" function --- code/fm.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'code') diff --git a/code/fm.rb b/code/fm.rb index dff94c7a..4f1a5742 100644 --- a/code/fm.rb +++ b/code/fm.rb @@ -58,6 +58,16 @@ module Fm end end + def edit( filename, mode=nil, flags=nil ) + file = Directory::Entry.new( filename ) + file.refresh + raise "File doesn't exist" unless file.exists? + runcontext = RunContext.new( file, mode, flags, 'editor' ) + externally do + Action.run( runcontext ) + end + end + def reload_types() old_verbose_level = $VERBOSE $VERBOSE = nil -- cgit 1.4.1-2-gfad0 commit twtxt registry written in Gogbmor <ben@gbmor.dev>
summary refs log tree commit diff stats
path: root/svc/http_test.go
blob: 0faa0d352be7f41f8b2e3b72b41d671942715470 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47