summaryrefslogtreecommitdiff
path: root/shell/completion.bash
diff options
context:
space:
mode:
authorbuttering <54806742+buttering@users.noreply.github.com>2024-12-01 22:21:12 +0800
committerGitHub <noreply@github.com>2024-12-01 23:21:12 +0900
commitac508a1ce42452dc5f52549e39e8f1ba0edc70ac (patch)
tree1b938fb315a32eb93611edc17ed8f6260986c3ce /shell/completion.bash
parentd7fc1e09b1395656591fbefd309150b47f72ce6a (diff)
downloadfzf-ac508a1ce42452dc5f52549e39e8f1ba0edc70ac.tar.gz
Enhance install script to handle commented and uncommented lines (#3632) (#4112)
* Enhance install script to handle commented and uncommented lines (#3632) Resolves #3632 Enhance install script to handle commented and uncommented lines in shell file with user prompts for modification. - Track commented and uncommented lines in the file. - Prompt user to append or skip if the line is commented. - Ensure new lines are added only when necessary, based on user input. - To the `fish_user_key_bindings.fish`, the original logic would append the line to the end if no corresponding statement was found. I’ve adopted the same behavior for commented lines. * Refactor append_line function to improve line existence check. - Replaced `lno` variable with `lines` to store matching lines and simplified the logic. - Improved line existence check, now prints all matching lines directly and handles commented lines separately. - Removed unnecessary variables like `all_commented`, `commented_lines`, and `non_commented_lines`. * Fix indentation --------- Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
Diffstat (limited to 'shell/completion.bash')
0 files changed, 0 insertions, 0 deletions