Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(completions/*): apply API renaming #1051

Merged
merged 18 commits into from
Nov 18, 2023

Conversation

akinomyoga
Copy link
Collaborator

No description provided.

@akinomyoga akinomyoga changed the title [Wait #1049] refactor(completions/*): apply API renaming refactor(completions/*): apply API renaming Sep 25, 2023
@akinomyoga akinomyoga marked this pull request as ready for review September 25, 2023 21:57
Copy link
Owner

@scop scop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, pre-approved with a few comments.

completions/apt-cache Outdated Show resolved Hide resolved
completions/apt-cache Outdated Show resolved Hide resolved
completions/apt-get Outdated Show resolved Hide resolved
akinomyoga and others added 11 commits November 15, 2023 08:12
The original two xfuncs (exported functions):
`_comp_xfunc_apt_cache_{sources,src_packages}` are merged into a
single generator interface: `_comp_xfunc_apt_cache_compgen_sources`.
The difference of the original two xfuncs seems to have been just the
former accepts `cur` (filtering prefix) as an argument while the
latter uses variable `cur` in the context.  We do not need to prepare
such variations for generators because the filtering prefix is
externally specified to generators by `_comp_compgen -c cur`.

Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
The last character of the variable can be obtained by simply ${var:
-1} from bash-2.0, so there is no need to use a helper function to
calculate the offset from the variable length.

The function is originally introduced in commit 8b23c84 as a
function named `__tar_last_char` along with many other functions, but
there does not seem to be specific reason for using the function to
get the last character of variables.
@akinomyoga
Copy link
Collaborator Author

rebased

akinomyoga and others added 7 commits November 18, 2023 12:57
Note: We remove the deprecated function
`_comp_cmd_apt_get_installed_packages` because this function is
introduced in commit ef1b97b (2020-11-07) after the latest release
2.11 (2020-07-25), i.e., this function has never been a part of the
public interface in a released version.

Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
@akinomyoga akinomyoga merged commit 3fbf99e into scop:master Nov 18, 2023
7 checks passed
@akinomyoga akinomyoga deleted the refactor-api-8 branch November 18, 2023 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants