diff options
author | portix <portix@gmx.net> | 2013-05-21 12:07:41 +0200 |
---|---|---|
committer | portix <portix@gmx.net> | 2013-05-21 12:07:41 +0200 |
commit | 53471b775ec2ec5b1401752c2955873f25634b13 (patch) | |
tree | db72bb5d06f29763a885e110ce89e0386056124b | |
parent | 77aa64c8577ad3b66e2943d62c7b07faabb96a72 (diff) | |
download | dwb-53471b775ec2ec5b1401752c2955873f25634b13.zip |
Error message when including archive fails, bash-completion for --archive
-rw-r--r-- | contrib/bash-completion | 18 | ||||
-rw-r--r-- | src/scripts.c | 2 | ||||
-rw-r--r-- | src/view.c | 2 |
3 files changed, 18 insertions, 4 deletions
diff --git a/contrib/bash-completion b/contrib/bash-completion index 4de384a2..818ff634 100644 --- a/contrib/bash-completion +++ b/contrib/bash-completion @@ -78,6 +78,13 @@ __enabled_extension() { [[ " ${disabled} " != *" ${installed} "* ]] && printf "${installed} " done)" -- $cur ) ) } +__archive() { + COMPREPLY=( $( compgen -W "$( case $prev in + --archive) printf 'a h d e l p s u ';; + *) _filedir;; + esac)" -- $cur ) ) +} + _dwb() { local cur prev opts lopts @@ -127,7 +134,7 @@ _dwbem() { opts="-h -a -b -B -c -d -e -E -i -I -l -L -n -N -r -p -u -U" lopts="--help --list-all --bind --setbind --config --disable --enable --edit --install --info --list-installed --setload --no-config --no-confirm - --remove --proxy --upgrade --update" + --remove --proxy --upgrade --update --archive" extinstops=" -B --setbind -c --config -d --disable -e --enable -E --edit -L --setload -r --remove -U --update " @@ -141,6 +148,10 @@ _dwbem() { __disabled_extension return 0 } + [[ " --archive " == *" ${prev} "* ]] && { + __archive + return 0 + } [[ "${extinstops}" == *" ${prev} "* ]] && { __installed_extension return 0 @@ -154,9 +165,12 @@ _dwbem() { --*) COMPREPLY=( $( compgen -W "${lopts}" -- $cur ) ) return 0;; - *) + -*) COMPREPLY=( $( compgen -W "${opts} ${lopts}" -- $cur ) ) return 0;; + *) + _filedir + return 0;; esac } && complete -F _dwbem dwbem diff --git a/src/scripts.c b/src/scripts.c index 9b5b8a1d..061df30d 100644 --- a/src/scripts.c +++ b/src/scripts.c @@ -1825,7 +1825,7 @@ global_include(JSContextRef ctx, JSObjectRef f, JSObjectRef this, size_t argc, c content = (char*) exar_search_extract(path, "main.js", NULL); if (content == NULL) { - js_make_exception(ctx, exc, EXCEPTION("include: reading %s failed."), path); + js_make_exception(ctx, exc, EXCEPTION("include: main.js was not found in %s."), path); goto error_out; } } @@ -1176,7 +1176,7 @@ view_load_error_cb(WebKitWebView *web, WebKitWebFrame *frame, char *uri, GError * */ /** * Callback called when the load-status of a WebKitWebView changes - * @callback signals~onLoadStatus + * @callback signals~onError * @param {WebKitWebView} webview * The webview that emitted the signal * @param {WebKitWebFrame} frame |