aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Dieter Plaetinck <dieter@plaetinck.be>2009-06-30 22:04:00 +0200
committerGravatar Dieter Plaetinck <dieter@plaetinck.be>2009-06-30 22:04:00 +0200
commitde3bcfcb9fc5304865c71d2518ea79d44b3ccbc4 (patch)
treec296e344603d0c430a7ef8d02bf0b77358740031
parent753dacc04d8e395bb23273d915fc5517c155cc8c (diff)
parentbb52eaf6f3ecdb6c2b8e49f1485891d8188f76ff (diff)
Merge commit 'dequis/stdin' into experimental
-rw-r--r--README4
-rw-r--r--uzbl.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/README b/README
index a4f6d9f..47b17b9 100644
--- a/README
+++ b/README
@@ -61,7 +61,7 @@ There are several interfaces to interact with uzbl:
* uzbl --config <filename>: <filename> will be read line by line, and the commands in it will be executed. useful to configure uzbl at startup.
If you have a file in `$XDG_CONFIG_HOME/uzbl/config` (this expands to ~/.config/uzbl/config on most systems) it will be automatically recognized
-* stdin: you can also write commands into stdin
+* stdin: to write commands into stdin, use `--config -` (or `-c -`)
* interactive: you can enter commands (and bind them to shortcuts, even at runtime)
By default, the behaviour is modal (vi style):
command mode: every keystroke is interpreted to run commands
@@ -302,7 +302,7 @@ Custom, userdefined scripts (`spawn foo bar`) get first the arguments as specifi
-u, --uri=URI Uri to load (equivalent to 'set uri = URI')
-v, --verbose Whether to print all messages or just errors.
-n, --name=NAME Name of the current instance (defaults to Xorg window id)
- -c, --config=FILE Config file (this is pretty much equivalent to uzbl < FILE )
+ -c, --config=FILE Config file (or `-` to use stdin)
--display=DISPLAY X display to use
--help Help
diff --git a/uzbl.c b/uzbl.c
index dd76e25..66f9595 100644
--- a/uzbl.c
+++ b/uzbl.c
@@ -2493,6 +2493,11 @@ settings_init () {
for (i = 0; default_config[i].command != NULL; i++) {
parse_cmd_line(default_config[i].command, NULL);
}
+
+ if (g_strcmp0(s->config_file, "-") == 0) {
+ s->config_file = NULL;
+ create_stdin();
+ }
if (!s->config_file) {
s->config_file = find_xdg_file (0, "/uzbl/config");
@@ -2780,8 +2785,6 @@ main (int argc, char* argv[]) {
/* WebInspector */
set_up_inspector();
- create_stdin();
-
if (verbose_override > uzbl.state.verbose)
uzbl.state.verbose = verbose_override;