summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre De Dommelin <adedommelin@tuxz.net>2017-03-12 15:49:46 -0700
committerLukas Schwaighofer <lukas@schwaighofer.name>2017-03-12 15:49:46 -0700
commitf8d570423a8f9b422408c7a0ee66b6df283e3498 (patch)
treeede6025ecea3bb53ef0861b99f2df28dddc0c438
parentf0902f3d57cc6e17b59c635b5d2ca813ddc3bd4d (diff)
cmdline
# Description: add support for command line argument as initial content # Author: Fernando Vezzosi <fv@linuxvar.it> Gbp-Pq: Name 70-cmdline.patch
-rw-r--r--src/main.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.cc b/src/main.cc
index dc4b034..b234bc5 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -619,6 +619,10 @@ int main(int argc, char **argv)
gtk_completion_line_last_history_item(GTK_COMPLETION_LINE(compline));
}
+ if(argc == 2 && argv[1]){
+ gtk_entry_set_text(GTK_ENTRY(compline), argv[1]);
+ }
+
gtk_box_pack_start(GTK_BOX(hbox), compline, TRUE, TRUE, 0);
int prefs_top = 80;