From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by sourceware.org (Postfix) with ESMTPS id 7562B3858CD1 for ; Wed, 20 Dec 2023 19:24:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7562B3858CD1 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7562B3858CD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::d2c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703100244; cv=none; b=QxgwMbKGir4vNFwpJksE02eyDTGaXbtqWZy3wKs0DAM5NmDfurQXxK+Uvh+KEPHw4aBGvkaPr8gjXvgOEAfos8XnP8EfbgTyIvcfW63Oq0OQYAH/IFAmcav3QDEt1wCrLvYS0xtyeYz4hcInryTqtCn9tCPjoYj6yW0AKcTSLP0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703100244; c=relaxed/simple; bh=RBpZK5ll5uENzAnf8Mq8D5DaBow38L6LWEhzTxM0cno=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=VdZ+z6jbCwPUycXGhtoYlDLz/xcpsHfQjXNdqoEKHm4jMWohMg1covB2b2xtcBy52/RUBjoQnNRTd1azBNeieFN1WQfzFLCbZnPaOr+MQxE2MecH2s5DxVaexEcoDOmjBlT+345hT/FrAcvGt+aDmHkys94DAnIN7i+SJX3gM7g= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-7ba737ee9b5so65139f.0 for ; Wed, 20 Dec 2023 11:24:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703100241; x=1703705041; darn=cygwin.com; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=9vjBBGRc1dp/aImlEoTMMtGRocNdvlOy/ERlEqzJx4E=; b=NelNbLbbPqxhe/sMwaEmT4JGznfm53Fb/uWYOBNQEIf4rcOK3jZ2CU8Mlp6R5QLrxx 78f7c2VOXb62pp1JRZd6yln3NVMktjuoMNRll6dcCq89PzYExCngDeeVOAvzdoGf29Sz Z4mT1rirFyNRawoOHt+erHygrK/A/UZJrcse2Rbtn05aQWz8HKre66muPs91Pd1IkPrY w6sDjdf7P/BJYTpq7Lrt7mz5LfWhNMT+xPXcpWzC1fE45misIkp3KBfoZXyKcfIeoTmJ o50wNUEqCG6QVuXcP+4P7BwHevcOY8tN+JLUdWrcS54f1Jz66At5fXDZY3BUTRG/nKFE 2sWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703100241; x=1703705041; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9vjBBGRc1dp/aImlEoTMMtGRocNdvlOy/ERlEqzJx4E=; b=fF7kx6BRGdx3j0v2dB/BNF+ILUmsix24vDA4/zvfIdujIE/OAHNluGAi/toodC+9xj zYC9TcAKMjpcG7VEodrAQjs8n4NfVRb2gkLOJM7SI/1z+XFULqzbsjiBc+CeMWLUdxq0 a++eUhB9Wq47CvKFCuS1nKhJNezqx+6KooMBp3855d9chUo4PGJab34KD601D8LQ9V2M zaTJq1S/+pmZU6IWjJnhDw3tzgUIIpEIBceZLNJ5Vumf0ZoAiY2tOAGMYnHCjzezgYj0 rfIMhIJYyJkb+Nypd86NS0y46YnJt+LkbAfVNW+TbFtUiCYeM0kayFLbEFgcvnMS6kME S45Q== X-Gm-Message-State: AOJu0YyzL8aexaBgsnjAbgu0yYBze52oCNTGQBnn/euC/8OYwMjvItkZ j1HBdBftMnLyhb86FOSYY9BIKT0h+d/TZTZbPB4= X-Google-Smtp-Source: AGHT+IFNLcoyp/ZZEX8F9RNQhbNIueq4pm8afT7FNTmtBYSHX8DuqBkKPjZurWDtj19it2KiOaXaU/VrQcZBguVarGw= X-Received: by 2002:a6b:e714:0:b0:7b7:350b:1ed3 with SMTP id b20-20020a6be714000000b007b7350b1ed3mr21498487ioh.10.1703100241699; Wed, 20 Dec 2023 11:24:01 -0800 (PST) MIME-Version: 1.0 References: <7d0e764a-3f03-42c8-a6f3-63355e218f1e@gmail.com> <13058478.2154617.1703098667904@mail.yahoo.com> In-Reply-To: <13058478.2154617.1703098667904@mail.yahoo.com> From: Lee Date: Wed, 20 Dec 2023 14:23:49 -0500 Message-ID: Subject: Re: vim: errors launching "/usr/bin/vi To: matthew patton Cc: marco atzeri , "cygwin@cygwin.com" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, Dec 20, 2023 at 1:57=E2=80=AFPM matthew patton wrote: > > > Would you please let me know how to make an /etc/alternatives for vi/vi= m? > > did you install the alternatives package? I installed cygwin back in 2017; I don't remember what all I've installed but it seems to be there: $ ls -l /usr/sbin/alt* -rwxr-xr-x 1 root None 20499 Apr 4 2013 /usr/sbin/alternatives.exe > I just use aliases (actually I set EDITOR=3Dxxx) after I enumerate the ed= itors I consider worthy of inclusion and resident. That's my current work-around # set the bash prompt # "$SHLVL" =3D 1 is true for the 1st shell, and incremented # each time another instance of bash is started. eg # vi /tmp/foo # :sh # and you're in a new shell so SHLVL was incremented # if [ "$SHLVL" =3D 1 ]; then PS1=3D'\[\e]2;\u@\h \w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ = ' else PS1=3D'\[\e]2;\u@\h \w\a\]\n\u@\h \w\n\$ ' alias vi=3Dvim fi > What DOES need nuking is the forced alias in /etc/profile.d. That's inexc= usable interference in the system. I'd say vi/vim needs to be put under /etc/alternatives If anyone has access to a redhat linux system, do they 'alias vi=3Dvim' or put vi under /etc/alternatives? Debian uses alternatives: $ update-alternatives --query vi Name: vi Link: /usr/bin/vi Slaves: vi.1.gz /usr/share/man/man1/vi.1.gz vi.da.1.gz /usr/share/man/da/man1/vi.1.gz vi.de.1.gz /usr/share/man/de/man1/vi.1.gz vi.fr.1.gz /usr/share/man/fr/man1/vi.1.gz vi.it.1.gz /usr/share/man/it/man1/vi.1.gz vi.ja.1.gz /usr/share/man/ja/man1/vi.1.gz vi.pl.1.gz /usr/share/man/pl/man1/vi.1.gz vi.ru.1.gz /usr/share/man/ru/man1/vi.1.gz Status: auto Best: /usr/bin/vim.basic Value: /usr/bin/vim.basic Alternative: /usr/bin/vim.basic Priority: 30 Slaves: vi.1.gz /usr/share/man/man1/vim.1.gz vi.da.1.gz /usr/share/man/da/man1/vim.1.gz vi.de.1.gz /usr/share/man/de/man1/vim.1.gz vi.fr.1.gz /usr/share/man/fr/man1/vim.1.gz vi.it.1.gz /usr/share/man/it/man1/vim.1.gz vi.ja.1.gz /usr/share/man/ja/man1/vim.1.gz vi.pl.1.gz /usr/share/man/pl/man1/vim.1.gz vi.ru.1.gz /usr/share/man/ru/man1/vim.1.gz $ update-alternatives --query vim Name: vim Link: /usr/bin/vim Status: auto Best: /usr/bin/vim.basic Value: /usr/bin/vim.basic Alternative: /usr/bin/vim.basic Priority: 30 Regards, Lee