Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@towry
Copy link
Owner

@towry towry commented Jun 5, 2025

No description provided.

Copilot AI review requested due to automatic review settings June 5, 2025 05:24
@what-the-diff
Copy link

what-the-diff bot commented Jun 5, 2025

PR Summary

  • Improved User Experience in Fish Shell
    The team delivered a new configuration that enhances user experience while using the Fish shell. This configuration home.file.fishCompletions allows the system to suggest possible completions while the user is typing in the shell, thereby simplifying the operation and speeding execution time. This feature is customizable, with the user being able to specify both the target directory and the source file.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds configuration support and a completion script for the glab-new-pr alias to enhance GitLab merge request functionality via the fish shell.

  • Adds a new fish completion configuration block in nix/hm/fish.nix.
  • Introduces a new fish completion script in conf/fish/shellcompl/glab-new-pr.fish.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
nix/hm/fish.nix Adds configuration for enabling fish completions from a new source.
conf/fish/shellcompl/glab-new-pr.fish Implements a fish completion script for the glab-new-pr alias.
Comments suppressed due to low confidence (1)

nix/hm/fish.nix:66

  • Consider adding a brief inline comment to explain the purpose of the fishCompletions configuration block for future maintainers.
home.file.fishCompletions = {

Comment on lines +4 to +5
# Complete with git branches (local and remote) sorted by commit date
complete -c glab-new-pr -f -a '(git branch -a --sort=-committerdate 2>/dev/null | string replace -r "^\s*[\*\+]?\s*" "" | string replace -r "^remotes/[^/]+/" "" | awk "!seen[\$0]++" 2>/dev/null)' -d "Create GitLab merge request for branch"
Copy link

Copilot AI Jun 5, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider refactoring the complex piped command into a separate helper script or adding detailed inline comments to enhance readability and future maintainability.

Suggested change
# Complete with git branches (local and remote) sorted by commit date
complete -c glab-new-pr -f -a '(git branch -a --sort=-committerdate 2>/dev/null | string replace -r "^\s*[\*\+]?\s*" "" | string replace -r "^remotes/[^/]+/" "" | awk "!seen[\$0]++" 2>/dev/null)' -d "Create GitLab merge request for branch"
# Helper function to get git branches (local and remote) sorted by commit date
function __get_git_branches
# List all branches (local and remote) sorted by committer date
git branch -a --sort=-committerdate 2>/dev/null |
# Remove leading symbols (*, +) and whitespace
string replace -r "^\s*[\*\+]?\s*" "" |
# Remove remote prefixes (e.g., "remotes/origin/")
string replace -r "^remotes/[^/]+/" "" |
# Deduplicate branch names
awk "!seen[\$0]++" 2>/dev/null
end
# Complete with git branches (local and remote) sorted by commit date
complete -c glab-new-pr -f -a '(__get_git_branches)' -d "Create GitLab merge request for branch"

Copilot uses AI. Check for mistakes.
The commit adds detailed API design and function signature guidelines to the prompt generation documentation, including anti-patterns to avoid and best practices for clear function contracts.
@towry towry force-pushed the next branch 3 times, most recently from 58ccaf9 to 235f7cd Compare June 6, 2025 09:28
@towry towry merged commit 5ce7b0f into main Jun 8, 2025
1 check passed
@towry towry deleted the next branch June 8, 2025 09:16
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