From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13016 invoked from network); 12 Oct 2022 22:02:52 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 12 Oct 2022 22:02:52 -0000 Received: from mx0.riseup.net ([198.252.153.6]) by 9front; Wed Oct 12 18:01:29 -0400 2022 Received: from fews2.riseup.net (fews2-pn.riseup.net [10.0.1.84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx0.riseup.net (Postfix) with ESMTPS id 4Mnmnc6jmsz9s7v for <9front@9front.org>; Wed, 12 Oct 2022 22:01:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1665612084; bh=D5arhqMfNGlA8WXInBY/bwZuQcl/KwQkOq4AxyUYth0=; h=Subject:To:References:From:Date:In-Reply-To:From; b=UfAjdhCsLnxjf8r4LTxwr06arZf1aUyKUElcDtx2oeL/222KG+7v+rPDmUnfgBISS Jx9wqWAdr7vEFqisefyexvh61AXXtt1OkT1HdPN6mjEPTcsHJXh9BeVEXqjEa8SPrG kYqGB9QqXpMl6P2W2Edi72X0WOkEtuCE0aeS3xBg= X-Riseup-User-ID: B719F88A4FB57963131D331E4103BAB67676C48C36E554C7E1259D1BE4EEDB73 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews2.riseup.net (Postfix) with ESMTPSA id 4Mnmnc1l1Nz1yQc for <9front@9front.org>; Wed, 12 Oct 2022 22:01:23 +0000 (UTC) To: 9front@9front.org References: From: mkf9 Message-ID: <569da4d3-d380-9277-8742-ab85d9ec53cf@riseup.net> Date: Thu, 13 Oct 2022 01:31:20 +0330 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: distributed property hardware XMPP browser hypervisor element scripting solution Subject: Re: [9front] [PATCH] hget: file name detection Reply-To: 9front@9front.org Precedence: bulk unobe@cpan.org wrote: > For an example of the first thing Alex brought up: > > hget -a -b http://www.example.com/videos ../images/image01.jpg > > The '?' and following is a query component: > > https://www.example.com/your.jpg?_dc=19594393 > I have tried some URLs with queries with them and haven't seen any which fails, why should they? for the other issue, i think this version will do. --- /bin/hget +++ /bin/hget @@ -2,7 +2,7 @@ rfork e argv0=$0 fn usage { - echo usage: $argv0 '[ -l | -o file] [ -p body | -P ] [ -r header ] [ -m method ] [ -b baseurl ] url' >[1=2] + echo usage: $argv0 '[ -l | -a | -o file] [ -p body | -P ] [ -r header ] [ -m method ] [ -b baseurl ] url' >[1=2] exit usage } s=0 @@ -34,6 +34,8 @@ case -b b=$2 shift + case -a + o=`{basename $$#*} case * usage }