mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-12-11 07:21:45 +01:00
github #147: Clean up some leaked variables in completion functions
This commit is contained in:
parent
48e612fa07
commit
a53cd5eacb
4 changed files with 7 additions and 3 deletions
|
|
@ -1,5 +1,9 @@
|
||||||
2025-10-23 Oliver Kiddle <opk@zsh.org>
|
2025-10-23 Oliver Kiddle <opk@zsh.org>
|
||||||
|
|
||||||
|
* Kevin Cox: github #147: Completion/Unix/Command/_git,
|
||||||
|
Completion/Unix/Command/_ssh, Completion/Unix/Type/_hosts:
|
||||||
|
Clean up some leaked variables in completion functions
|
||||||
|
|
||||||
* 53999: Src/module.c: remove further remnants of ansi2knr
|
* 53999: Src/module.c: remove further remnants of ansi2knr
|
||||||
support from AIX specific code
|
support from AIX specific code
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7181,7 +7181,7 @@ __git_remote_branch_names () {
|
||||||
__git_remote_branch_names_noprefix () {
|
__git_remote_branch_names_noprefix () {
|
||||||
declare -a heads
|
declare -a heads
|
||||||
|
|
||||||
branch_names=(${${${${(f)"$(_call_program remote-branch-refs-noprefix git for-each-ref --format='"%(refname)"' refs/remotes 2>/dev/null)"}#refs/remotes/}#*/}:#HEAD})
|
local branch_names=(${${${${(f)"$(_call_program remote-branch-refs-noprefix git for-each-ref --format='"%(refname)"' refs/remotes 2>/dev/null)"}#refs/remotes/}#*/}:#HEAD})
|
||||||
__git_command_successful $pipestatus || return 1
|
__git_command_successful $pipestatus || return 1
|
||||||
|
|
||||||
__git_describe_commit branch_names remote-branch-names-noprefix 'remote branch name' "$@"
|
__git_describe_commit branch_names remote-branch-names-noprefix 'remote branch name' "$@"
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
# TODO: sshd, ssh-keysign
|
# TODO: sshd, ssh-keysign
|
||||||
|
|
||||||
_ssh () {
|
_ssh () {
|
||||||
local curcontext="$curcontext" state line expl suf arg ret=1
|
local curcontext="$curcontext" state line lstate expl suf arg ret=1
|
||||||
local args sigargs common common_transfer options algopt tmp p1 file cmn cmds sdesc tdesc
|
local args sigargs common common_transfer options algopt tmp p1 file cmn cmds sdesc tdesc
|
||||||
typeset -A opt_args tsizes
|
typeset -A opt_args tsizes
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ if ! zstyle -a ":completion:${curcontext}:hosts" hosts _hosts; then
|
||||||
|
|
||||||
for khostfile in $khostfiles; do
|
for khostfile in $khostfiles; do
|
||||||
if [[ -r $khostfile ]]; then
|
if [[ -r $khostfile ]]; then
|
||||||
khosts=(${(s/,/j/,/u)${(f)"$(<$khostfile)"}%%[ |#]*})
|
local khosts=(${(s/,/j/,/u)${(f)"$(<$khostfile)"}%%[ |#]*})
|
||||||
|
|
||||||
# known_hosts syntax supports the host being in the form [hostname]:port
|
# known_hosts syntax supports the host being in the form [hostname]:port
|
||||||
# The filter below extracts the hostname from lines using this format.
|
# The filter below extracts the hostname from lines using this format.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue