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=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14796 invoked from network); 27 Apr 2021 13:07:48 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 27 Apr 2021 13:07:48 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1619528868; b=rW7/W+b3g5BVegoIY/2rlLNkJ9B4+3R8tol/VrC+9M2SKqJUbp2cWHoxOdCMpAxDAT5e0qsXsd N+cM/SQuRvAkff5mOKvdUycHymd1Af+lThmobcy92pDz4twg+U6FAXJSI6FPPwlKUJMSagrBl6 zDg8qqx8jhUyOf8R39mQyKtIxiKSDiJEDZKR2uOBTUDGwqXvAvTtoAH+CkUeIdKlL9tCBgttE/ 048BekLTt/ThG1nEzqrGrAipAId7wydo0BR32F/wQIgcf0zj9H97YnLgAWqjxcaYeJnGhXua9v gHxjJr+KfQ6rw+ABQc5pKhLODmTdFOhSJuLezhLN/rt40Q==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (st43p00im-zteg10061901.me.com) smtp.remote-ip=17.58.63.168; dkim=pass header.d=me.com header.s=1a1hai header.a=rsa-sha256; dmarc=pass header.from=me.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1619528868; bh=YY21HJS2Acn26IT+C57mS0ALqz6RYdHrTF/FAK7UqxU=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:To:References:Message-ID:Content-Transfer-Encoding:Cc:Date: In-Reply-To:From:Subject:MIME-Version:Content-Type:DKIM-Signature: DKIM-Signature; b=Vcjy+iZlnCt73XgjMxzY5aYHbkkgkznKfw7H08m9+D9vrhHa5SXpBlQDJLiun2j9eyKLedBqv3 qGUeHTBZVXzS+PPnk/tFAqfUCia1ReOmz5pRGgn1auBTpUViA2AkYpYUTeMHPKVNMpQagQ8UuC lR3a3CdPNuW4enSnuqlIS9u4fvw0WNwsQONFK+ryyhSaMZq6LIFZbgVwOZ/RFUCX5kkU4lIhWs 0hfKXYNKBSKf/D7vL8NEFwPovP3/E6lMliSH99AQ6LX8Ekz0UeiR/c2hnIgO51ckGiX9Xv2WOU 3DkbA3H3cbvibiNDx8dUME/+/tGQoLTtwP0x8dq7I9LUMg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:To:References:Message-Id: Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version: Content-Type:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=4W1s0WzfUZB7VDuiSTlKPUKIJu898YqGfdlJSdt6yCs=; b=pjV8vOxnZlybO8vkhCvjzDb2Y8 uNlKvH7tldv/JdrmnfNYNYfr3x3gU+L4x+HBOOaRZF1aHehcKTVKCuaREi5vAD9R2rWHDkRLX/VHO nTPiwOFMHr4n2a5F4BqHLtbhB4xFWPQ8QfP9ZXqqrQG0RMV2HvfR5g634Db/5J0ULyfSvTHPFm7E1 5PgcZ31nbLPEqJcJFt2CFHoqoqCGn2aWF2HZlkvSbVq5YTP+D7uTAtAj0isOonijtDhUj3boVAbMy PqE8BK/NRk3fw/z37Xxcxk/HeDQmWSpXe7ZRFdvqALO6BK0RiLeVxvk9uFRxaJWIAKH18cksxKzzj DU1fttbQ==; Received: from authenticated user by zero.zsh.org with local id 1lbNRL-0002mV-HF; Tue, 27 Apr 2021 13:07:47 +0000 Authentication-Results: zsh.org; iprev=pass (st43p00im-zteg10061901.me.com) smtp.remote-ip=17.58.63.168; dkim=pass header.d=me.com header.s=1a1hai header.a=rsa-sha256; dmarc=pass header.from=me.com; arc=none Received: from st43p00im-zteg10061901.me.com ([17.58.63.168]:34136) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1lbNQF-0002Ar-Uz; Tue, 27 Apr 2021 13:06:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1619528798; bh=4W1s0WzfUZB7VDuiSTlKPUKIJu898YqGfdlJSdt6yCs=; h=Content-Type:Mime-Version:Subject:From:Date:Message-Id:To; b=HEYkArKVgAwrMC9R0LpLPKReVzIIUs9726mZMI2rse9T50aTqouCwUmrvcPjVcGUQ d4dIob2LBMqihSUiQZudG84j36D0PjP8Cw5hz8ynRYQkTIDHnRgdjDopRQypsvBGe3 msyYp9oPwGIEEdKqJ4fH17VGCeeSAO8gCOTXXOJyImNikGWpzDclANBiqVTOO6rHbw elzPZ96mDkgr9qbMFjh6LhmDKzZjsV9pAPhUrkTP1RIc4QkFrY7E1tDhW9loxZfnsQ dWUUgQuseQ01pAgZnJMJ7KDWiWeJXRZ7GbBD4u61XC9jmY5aMN6O97StljBvZh6ZuW CpHI8iUTZ0JpQ== Received: from 149-166-235-250.dhcp-in.iupui.edu (149-166-235-250.dhcp-in.iupui.edu [149.166.235.250]) by st43p00im-zteg10061901.me.com (Postfix) with ESMTPSA id 807FE8603E2; Tue, 27 Apr 2021 13:06:38 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Subject: Re: Alias help From: Akihiko Hohji In-Reply-To: Date: Tue, 27 Apr 2021 09:06:37 -0400 Cc: Eric Cook , zsh@rayninfo.co.uk Content-Transfer-Encoding: quoted-printable Message-Id: <872A3A9E-541A-4B72-BB5A-F2EE7ADD0FEE@me.com> References: <82B6395B-6043-42A1-A3FD-8B4F42C3A756@iu.edu> To: zsh-users@zsh.org X-Mailer: Apple Mail (2.3445.104.17) X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.391,18.0.761,17.0.607.475.0000000_definitions?= =?UTF-8?Q?=3D2021-04-27=5F06:2021-04-27=5F03,2021-04-27=5F06,2020-04-07?= =?UTF-8?Q?=5F01_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 clxscore=1011 spamscore=0 mlxscore=0 malwarescore=0 mlxlogscore=636 suspectscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2104270095 X-Seq: 26707 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: HI Eric,=20 Thanks for answering a newbie question. As zzapper suggested, I might = try keeping this command as a function. =20 Aki=20 > On Apr 26, 2021, at 7:15 PM, Eric Cook wrote: >=20 > On 4/26/21 6:55 PM, Hoji, Aki wrote: >> alias pu =3D"pip3 list -o | sed "1,2 d" |cut -d ' ' -f1 | xargs -n1 = pip3 install -U=E2=80=9D >=20 > As a shell function: > pu() { = ~ > pip3 list -o | > sed "1,2 d" | > cut -d ' ' -f1 | > xargs -n1 pip3 install -U > } >=20 > While not to the degree of say python, whitespace matters often in = shell; > You have an extra space after the name of the alias pu, so the =3Dword = triggered a different > feature of zsh that expands the path to a command. in this case "pip3 = list -o | sed 1,2" > once you remove the space you still have the problem of not quoting = correctly. >=20 > alias pu=3D'pip3 list -o | sed "1,2 d" |cut -d '\'' '\'' -f1 | xargs = -n1 pip3 install -U' >=20 > Is how to quote that command properly, which is less readable than a = function is in my opinion. >=20