Logo
Explore Help
Sign In
h/fish-shell
1
Fork 0
You've already forked fish-shell
mirror of https://github.com/fish-shell/fish-shell.git synced 2026-04-30 17:41:14 -03:00
Code Issues Packages Projects Releases Wiki Activity
Files
c9cc2a4069da6c7f231810df5c729887e0b32c2b
fish-shell/share/functions/__fish_is_nth_token.fish

7 lines
315 B
Fish
Raw Normal View History

Mark private functions that don't need localization See the next commit. Part of #11833
2025-09-29 09:30:35 +02:00
# localization: skip(private)
Make __fish_is_nth_token and __fish_nth_token private again Their names are not perfect, so let's keep them as internal functions, until we figure out how/if we want to expose this. This reverts 0445126c2 (Undunder __fish_is_nth_token, 2021-06-29) (but I did it without "git revert"). Closes #8008
2022-02-09 09:46:07 +01:00
function __fish_is_nth_token --description 'Test if current token is the Nth (ignoring command and switches/flags)' --argument-names n
completion: adopt commandline -x replacing deprecated -o This gives us more accurate completions because completion scripts get expanded paths
2024-01-22 07:42:45 +01:00
set -l tokens (commandline -pxc)
Make __fish_is_nth_token and __fish_nth_token private again Their names are not perfect, so let's keep them as internal functions, until we figure out how/if we want to expose this. This reverts 0445126c2 (Undunder __fish_is_nth_token, 2021-06-29) (but I did it without "git revert"). Closes #8008
2022-02-09 09:46:07 +01:00
set -l tokens (string replace -r --filter '^([^-].*)' '$1' -- $tokens)
test (count $tokens) -eq "$n"
Add udevadm completions [ci skip]
2020-07-01 09:25:36 -05:00
end
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.3 Page: 159ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API