X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0BEFD3861032 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1703100258; bh=rHpbobMQX497KmkBFop8xXgVgk7NMc2CDuErSi6SzBA=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=fjH1estY8Id7z2QKxbTf+1LSW5hzM3nog+HkP5+jtFka1DgrbaS+haEZ5CiOsC+oi LjvK0Laue1SrrQPUYp0RAO/Lv2P+ytmANOb7zoo2H4ehhLgxb7/cApyap/BlssGSix +RkuJbtdJRnEULui4O6rBkbHvQYAB8k4Lt8jp1wg= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7562B3858CD1 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7562B3858CD1 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 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 AT gmail DOT com> <13058478 DOT 2154617 DOT 1703098667904 AT mail DOT yahoo DOT com> In-Reply-To: <13058478.2154617.1703098667904@mail.yahoo.com> Date: Wed, 20 Dec 2023 14:23:49 -0500 Message-ID: Subject: Re: vim: errors launching "/usr/bin/vi To: matthew patton 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 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Lee via Cygwin Reply-To: Lee Cc: "cygwin AT cygwin DOT com" Content-Type: text/plain; charset="utf-8" Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 3BKJOIOe021338 On Wed, Dec 20, 2023 at 1:57 PM matthew patton wrote: > > > Would you please let me know how to make an /etc/alternatives for vi/vim? > > 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=xxx) after I enumerate the editors I consider worthy of inclusion and resident. That's my current work-around # set the bash prompt # "$SHLVL" = 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" = 1 ]; then PS1='\[\e]2;\u@\h \w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ ' else PS1='\[\e]2;\u@\h \w\a\]\n\u@\h \w\n\$ ' alias vi=vim fi > What DOES need nuking is the forced alias in /etc/profile.d. That's inexcusable 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=vim' 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 -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple