From d32415ebcbfd2d913cd294b11754aa75752cc498 Mon Sep 17 00:00:00 2001
From: Daniel Carl <danielcarl@gmx.de>
Date: Sat, 16 Feb 2013 15:49:16 +0100
Subject: [PATCH] Removed redundant input* commands.

These commands can be replaces by the input command with the parameters and
the new inputuri command that prints the text into inputbox appended by the
current uri.
---
 doc/vimp.1.txt | 28 ++++++++++++++--------------
 src/command.c  |  5 +----
 src/config.h   |  8 ++++----
 3 files changed, 19 insertions(+), 22 deletions(-)

diff --git a/doc/vimp.1.txt b/doc/vimp.1.txt
index ee7af53..0835aa7 100644
--- a/doc/vimp.1.txt
+++ b/doc/vimp.1.txt
@@ -77,20 +77,20 @@ Open the url from clipboard.
 Switches the browser into Command Mode and prefill the inputbox on th bottom of
 the browser with various prefilled content.
 .TP
-.B input
-Writes ":" into to inputbox.
-.TP
-.B inputopen
-Writes ":open " into to inputbox.
-.TP
-.B inputtabopen
-Writes ":tabopen " into to inputbox.
-.TP
-.B inputopencurrent
-Writes ":open {url}" into to inputbox where {url} is the current used url.
-.TP
-.B inputtabopencurrent
-Writes ":tabopen {url}" into to inputbox where {url} is the current used url.
+.BI "input [" "TEXT" "]" 
+Writes
+.I TEXT
+into to inputbox and switch to command mode. If no
+.I TEXT
+is given, print ':' into the inputbox.
+.TP
+.BI "inputuri [" "TEXT" "]"
+Writes
+.I TEXT\fR{URI}
+into to inputbox where {URL} is the current used url. This can be used to add
+keybindings to generate the tabopen command with current uri prefilled. If
+.I TEXT
+is not given use ':' instead.
 .SS Navigate
 Following commands are used to navigate within the browser history.
 .TP
diff --git a/src/command.c b/src/command.c
index f9c35ac..d695de7 100644
--- a/src/command.c
+++ b/src/command.c
@@ -35,10 +35,7 @@ static CommandInfo cmd_list[] = {
     {"open-closed",         command_open_closed, {VP_TARGET_CURRENT}},
     {"tabopen-closed",      command_open_closed, {VP_TARGET_NEW}},
     {"input",               command_input,       {0, ":"}},
-    {"inputopen",           command_input,       {0, ":open "}},
-    {"inputtabopen",        command_input,       {0, ":tabopen "}},
-    {"inputopencurrent",    command_input,       {VP_INPUT_CURRENT_URI, ":open "}},
-    {"inputtabopencurrent", command_input,       {VP_INPUT_CURRENT_URI, ":tabopen "}},
+    {"inputuri",            command_input,       {VP_INPUT_CURRENT_URI, ":"}},
     {"quit",                command_close,       {0}},
     {"source",              command_view_source, {0}},
     {"back",                command_navigate,    {VP_NAVIG_BACK}},
diff --git a/src/config.h b/src/config.h
index 645a0fc..7f852e7 100644
--- a/src/config.h
+++ b/src/config.h
@@ -38,10 +38,10 @@ const struct {
     {"nmap <shift-?>=input ?"},
     {"smap n=search-forward"},
     {"smap N=search-backward"},
-    {"nmap o=inputopen"},
-    {"nmap t=inputtabopen"},
-    {"nmap O=inputopencurrent"},
-    {"nmap T=inputtabopencurrent"},
+    {"nmap o=input :open "},
+    {"nmap t=input :tabopen "},
+    {"nmap O=inputuri :open "},
+    {"nmap T=inputuri :tabopen "},
     {"nmap gh=open-home"},
     {"nmap gH=tabopen-home"},
     {"nmap u=open-closed"},
-- 
2.20.1