diff --git a/cmd/tools/modules/vhelp/vhelp.v b/cmd/tools/modules/vhelp/vhelp.v index d49b30edd1..0ad7ba0148 100644 --- a/cmd/tools/modules/vhelp/vhelp.v +++ b/cmd/tools/modules/vhelp/vhelp.v @@ -5,7 +5,7 @@ import os pub fn show_topic(topic string) { vexe := os.real_path(os.getenv('VEXE')) vroot := os.dir(vexe) - target_topic := os.join_path(vroot, 'cmd', 'v', 'help', '${topic}.txt') + target_topic := os.join_path(vroot, 'vlib', 'v', 'help', '${topic}.txt') content := os.read_file(target_topic) or { eprintln('Unknown topic: ${topic}') exit(1) diff --git a/cmd/v/v.v b/cmd/v/v.v index d5ebc081a7..5bf4e3a750 100755 --- a/cmd/v/v.v +++ b/cmd/v/v.v @@ -3,9 +3,9 @@ // that can be found in the LICENSE file. module main -import help import os import term +import v.help import v.pref import v.util import v.util.version diff --git a/cmd/v/help/ast.txt b/vlib/v/help/ast.txt similarity index 100% rename from cmd/v/help/ast.txt rename to vlib/v/help/ast.txt diff --git a/cmd/v/help/bin2v.txt b/vlib/v/help/bin2v.txt similarity index 100% rename from cmd/v/help/bin2v.txt rename to vlib/v/help/bin2v.txt diff --git a/cmd/v/help/bug.txt b/vlib/v/help/bug.txt similarity index 100% rename from cmd/v/help/bug.txt rename to vlib/v/help/bug.txt diff --git a/cmd/v/help/build-c.txt b/vlib/v/help/build-c.txt similarity index 100% rename from cmd/v/help/build-c.txt rename to vlib/v/help/build-c.txt diff --git a/cmd/v/help/build-js.txt b/vlib/v/help/build-js.txt similarity index 100% rename from cmd/v/help/build-js.txt rename to vlib/v/help/build-js.txt diff --git a/cmd/v/help/build-native.txt b/vlib/v/help/build-native.txt similarity index 100% rename from cmd/v/help/build-native.txt rename to vlib/v/help/build-native.txt diff --git a/cmd/v/help/build.txt b/vlib/v/help/build.txt similarity index 100% rename from cmd/v/help/build.txt rename to vlib/v/help/build.txt diff --git a/cmd/v/help/bump.txt b/vlib/v/help/bump.txt similarity index 100% rename from cmd/v/help/bump.txt rename to vlib/v/help/bump.txt diff --git a/cmd/v/help/check-md.txt b/vlib/v/help/check-md.txt similarity index 100% rename from cmd/v/help/check-md.txt rename to vlib/v/help/check-md.txt diff --git a/cmd/v/help/complete.txt b/vlib/v/help/complete.txt similarity index 100% rename from cmd/v/help/complete.txt rename to vlib/v/help/complete.txt diff --git a/cmd/v/help/default.txt b/vlib/v/help/default.txt similarity index 100% rename from cmd/v/help/default.txt rename to vlib/v/help/default.txt diff --git a/cmd/v/help/doc.txt b/vlib/v/help/doc.txt similarity index 100% rename from cmd/v/help/doc.txt rename to vlib/v/help/doc.txt diff --git a/cmd/v/help/doctor.txt b/vlib/v/help/doctor.txt similarity index 100% rename from cmd/v/help/doctor.txt rename to vlib/v/help/doctor.txt diff --git a/cmd/v/help/fmt.txt b/vlib/v/help/fmt.txt similarity index 100% rename from cmd/v/help/fmt.txt rename to vlib/v/help/fmt.txt diff --git a/cmd/v/help/gret.txt b/vlib/v/help/gret.txt similarity index 100% rename from cmd/v/help/gret.txt rename to vlib/v/help/gret.txt diff --git a/cmd/v/help/help.v b/vlib/v/help/help.v similarity index 95% rename from cmd/v/help/help.v rename to vlib/v/help/help.v index c217103573..30aac2bb89 100644 --- a/cmd/v/help/help.v +++ b/vlib/v/help/help.v @@ -11,7 +11,7 @@ const ( pub fn print_and_exit(topic string) { vexe := pref.vexe_path() vroot := os.dir(vexe) - topicdir := os.join_path(vroot, 'cmd', 'v', 'help') + topicdir := os.join_path(vroot, 'vlib', 'v', 'help') for b in topic { if (b >= `a` && b <= `z`) || b == `-` || (b >= `0` && b <= `9`) { diff --git a/cmd/v/help/help_test.v b/vlib/v/help/help_test.v similarity index 100% rename from cmd/v/help/help_test.v rename to vlib/v/help/help_test.v diff --git a/cmd/v/help/init.txt b/vlib/v/help/init.txt similarity index 100% rename from cmd/v/help/init.txt rename to vlib/v/help/init.txt diff --git a/cmd/v/help/install.txt b/vlib/v/help/install.txt similarity index 100% rename from cmd/v/help/install.txt rename to vlib/v/help/install.txt diff --git a/cmd/v/help/list.txt b/vlib/v/help/list.txt similarity index 100% rename from cmd/v/help/list.txt rename to vlib/v/help/list.txt diff --git a/cmd/v/help/ls.txt b/vlib/v/help/ls.txt similarity index 100% rename from cmd/v/help/ls.txt rename to vlib/v/help/ls.txt diff --git a/cmd/v/help/missdoc.txt b/vlib/v/help/missdoc.txt similarity index 100% rename from cmd/v/help/missdoc.txt rename to vlib/v/help/missdoc.txt diff --git a/cmd/v/help/new.txt b/vlib/v/help/new.txt similarity index 100% rename from cmd/v/help/new.txt rename to vlib/v/help/new.txt diff --git a/cmd/v/help/other.txt b/vlib/v/help/other.txt similarity index 100% rename from cmd/v/help/other.txt rename to vlib/v/help/other.txt diff --git a/cmd/v/help/outdated.txt b/vlib/v/help/outdated.txt similarity index 100% rename from cmd/v/help/outdated.txt rename to vlib/v/help/outdated.txt diff --git a/cmd/v/help/remove.txt b/vlib/v/help/remove.txt similarity index 100% rename from cmd/v/help/remove.txt rename to vlib/v/help/remove.txt diff --git a/cmd/v/help/repl.txt b/vlib/v/help/repl.txt similarity index 100% rename from cmd/v/help/repl.txt rename to vlib/v/help/repl.txt diff --git a/cmd/v/help/run.txt b/vlib/v/help/run.txt similarity index 100% rename from cmd/v/help/run.txt rename to vlib/v/help/run.txt diff --git a/cmd/v/help/search.txt b/vlib/v/help/search.txt similarity index 100% rename from cmd/v/help/search.txt rename to vlib/v/help/search.txt diff --git a/cmd/v/help/self.txt b/vlib/v/help/self.txt similarity index 100% rename from cmd/v/help/self.txt rename to vlib/v/help/self.txt diff --git a/cmd/v/help/shader.txt b/vlib/v/help/shader.txt similarity index 100% rename from cmd/v/help/shader.txt rename to vlib/v/help/shader.txt diff --git a/cmd/v/help/show.txt b/vlib/v/help/show.txt similarity index 100% rename from cmd/v/help/show.txt rename to vlib/v/help/show.txt diff --git a/cmd/v/help/symlink.txt b/vlib/v/help/symlink.txt similarity index 100% rename from cmd/v/help/symlink.txt rename to vlib/v/help/symlink.txt diff --git a/cmd/v/help/test.txt b/vlib/v/help/test.txt similarity index 100% rename from cmd/v/help/test.txt rename to vlib/v/help/test.txt diff --git a/cmd/v/help/tracev.txt b/vlib/v/help/tracev.txt similarity index 100% rename from cmd/v/help/tracev.txt rename to vlib/v/help/tracev.txt diff --git a/cmd/v/help/up.txt b/vlib/v/help/up.txt similarity index 100% rename from cmd/v/help/up.txt rename to vlib/v/help/up.txt diff --git a/cmd/v/help/update.txt b/vlib/v/help/update.txt similarity index 100% rename from cmd/v/help/update.txt rename to vlib/v/help/update.txt diff --git a/cmd/v/help/upgrade.txt b/vlib/v/help/upgrade.txt similarity index 100% rename from cmd/v/help/upgrade.txt rename to vlib/v/help/upgrade.txt diff --git a/cmd/v/help/version.txt b/vlib/v/help/version.txt similarity index 100% rename from cmd/v/help/version.txt rename to vlib/v/help/version.txt diff --git a/cmd/v/help/vet.txt b/vlib/v/help/vet.txt similarity index 100% rename from cmd/v/help/vet.txt rename to vlib/v/help/vet.txt diff --git a/cmd/v/help/vpm.txt b/vlib/v/help/vpm.txt similarity index 100% rename from cmd/v/help/vpm.txt rename to vlib/v/help/vpm.txt diff --git a/cmd/v/help/watch.txt b/vlib/v/help/watch.txt similarity index 100% rename from cmd/v/help/watch.txt rename to vlib/v/help/watch.txt diff --git a/cmd/v/help/where.txt b/vlib/v/help/where.txt similarity index 100% rename from cmd/v/help/where.txt rename to vlib/v/help/where.txt