public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Thien Trung Vuong <tvuong@microsoft.com>
To: git-commits@fedoraproject.org
Subject: [rpms/vim] f43: fix: handle symlinked paths in vi alias profiles
Date: Mon, 23 Nov 2026 15:18:39 GMT [thread overview]
Message-ID: <179544711900.1.7882598528914047087.rpms-vim-977dbf7eb295@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/vim
Branch : f43
Commit : 977dbf7eb295408c66a2bd1b48f08c237b55a693
Author : Thien Trung Vuong <tvuong@microsoft.com>
Date : 2026-11-20T14:28:31-07:00
Stats : +2/-2 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/vim/c/977dbf7eb295408c66a2bd1b48f08c237b55a693?branch=f43
Log:
fix: handle symlinked paths in vi alias profiles
When /usr/sbin is a symlink to /usr/bin and precedes it in PATH,
`command -v` reports /usr/sbin/vi and /usr/sbin/vim. The literal
/usr/bin comparison prevents the alias from being defined even though
both commands resolve to the expected executables.
Add an explicit check for /usr/sbin/vi and /usr/sbin/vim before creating
an alias.
Signed-off-by: Thien Trung Vuong <tvuong@microsoft.com>
---
diff --git a/vim.fish b/vim.fish
index b0b037d..16ae1e8 100644
--- a/vim.fish
+++ b/vim.fish
@@ -4,7 +4,7 @@ set vim_cond (command -v vim)
set vi_cond (command -v vi)
switch "$vim_cond-$vi_cond"
- case /usr/bin/vim-/usr/bin/vi
+ case /usr/bin/vim-/usr/bin/vi /usr/sbin/vim-/usr/sbin/vi
# apply only if founded vim and vi are in the expected dir from distro
function vi
command vim $argv
diff --git a/vim.sh b/vim.sh
index 3bec722..52ae4dc 100644
--- a/vim.sh
+++ b/vim.sh
@@ -1,7 +1,7 @@
if [ -n "${BASH_VERSION-}" -o -n "${KSH_VERSION-}" -o -n "${ZSH_VERSION-}" ]; then
# This will avoid user defined aliases and possibly stuff defined earlier in the PATH.
case "$(command -v vim)-$(command -v vi)" in
- /usr/bin/vim-/usr/bin/vi)
+ /usr/bin/vim-/usr/bin/vi|/usr/sbin/vim-/usr/sbin/vi)
# apply only when founded vim and vi are in expected dirs from distro
alias vi=vim
;;
reply other threads:[~2026-11-23 15:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179544711900.1.7882598528914047087.rpms-vim-977dbf7eb295@fedoraproject.org \
--to=tvuong@microsoft.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox