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-05-04 04:31:14 -03:00
Code Issues Packages Projects Releases Wiki Activity
Files
6627d403d33b4e74b49aa4db2a4f17709628cdc8
fish-shell/share/functions/__fish_is_nth_token.fish

6 lines
285 B
Fish
Raw Normal View History

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: 104ms Template: 2ms
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