fix '#' prefix
This commit is contained in:
parent
da6ee13a30
commit
24ea28eb13
|
@ -266,17 +266,21 @@ parse() {
|
||||||
sout="$(path | sed "s/\&/\&/g" | $RUNLAUNCHER "${rl_run[@]}")"
|
sout="$(path | sed "s/\&/\&/g" | $RUNLAUNCHER "${rl_run[@]}")"
|
||||||
|
|
||||||
# parse
|
# parse
|
||||||
case "$(printf '%c' "$sout" >&2)" in
|
case "${sout:0:1}" in
|
||||||
"#") EXEC="term" ;;
|
"#") EXEC="term" ;;
|
||||||
"?") EXEC="man" ;;
|
"?") EXEC="man" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
printf "Run launcher output: '%s'\n" "$sout" >> "$LOGFILE"
|
||||||
|
|
||||||
case "$(printf "%s" "$sout" | awk '{ print $1 }')" in
|
case "$(printf "%s" "$sout" | awk '{ print $1 }')" in
|
||||||
"magnet") EXEC=torrent ;;
|
"magnet") EXEC=torrent ;;
|
||||||
"www") EXEC=web ;;
|
"www") EXEC=web ;;
|
||||||
"?") print_help "$@" && parse && exec_cmd ;;
|
"?") print_help "$@" && parse && exec_cmd ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
printf "Type: '%s'\n" "$EXEC" >> "$LOGFILE"
|
||||||
|
|
||||||
# check for keywords
|
# check for keywords
|
||||||
printf "%s" "$sout" | grep -qE "$WEB_GREP" && EXEC=web
|
printf "%s" "$sout" | grep -qE "$WEB_GREP" && EXEC=web
|
||||||
printf "%s" "$sout" | grep -qE "$MAGNET_GREP" && EXEC=torrent
|
printf "%s" "$sout" | grep -qE "$MAGNET_GREP" && EXEC=torrent
|
||||||
|
@ -610,6 +614,7 @@ cache_desktop() {
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
[ -d "/System/Library/Extensions" ] && fail_mac "$@"
|
[ -d "/System/Library/Extensions" ] && fail_mac "$@"
|
||||||
|
rm -f "$LOGFILE"
|
||||||
print_config
|
print_config
|
||||||
read_args "$@"
|
read_args "$@"
|
||||||
check "$args"
|
check "$args"
|
||||||
|
|
Loading…
Reference in a new issue