Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Bug with ZLE special variables and traps?
- X-seq: zsh-workers 27821
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Bug with ZLE special variables and traps?
- Date: Mon, 22 Mar 2010 07:57:03 -0700
- In-reply-to: <20100322084226.GA26739@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <c16a574a0809181450t61a5b5ddq2e80797fde37636e@xxxxxxxxxxxxxx> <20080919162045.GA22435@xxxxxxxxxxxx> <20090706151644.6BF508027106@xxxxxxxxxxxxxxxxxx> <20090706154309.GA15663@xxxxxxxxxxxxxxxxxxxxxxxxxx> <20090706155337.GB15663@xxxxxxxxxxxxxxxxxxxxxxxxxx> <20100315164237.GA23224@xxxxxxxxxxxxxxxxxxxxxxxxxx> <100320105027.ZM20067@xxxxxxxxxxxxxxxxxxxxxx> <20100322084226.GA26739@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Hey, zsh-workers: Is this a recently-introduced bug? Why is PREBUFFER
empty in a signal handler at patchlevel 1.4940 when it is not at 1.4705?
On Mar 22, 10:42am, Nadav Har'El wrote:
} Subject: Re: Append cancelled commands to history
}
} On Sat, Mar 20, 2010, Bart Schaefer wrote about "Re: Append cancelled commands to history":
} >
} > Hmm. When I use TRAPINT, $PREBUFFER is always empty.
} >
} > torch% print $ZSH_VERSION $ZSH_PATCHLEVEL
} > 4.3.10-dev-1 1.4940
}
} Thanks for the explanations. For me, $PREBUFFER does work:
}
} $ print $ZSH_VERSION $ZSH_PATCHLEVEL
} 4.3.10 1.4705
} $ cat /etc/redhat-release; rpm -qf =zsh
} Fedora release 12 (Constantine)
} zsh-4.3.10-4.fc12.x86_64
}
} $ functions TRAPINT
} TRAPINT () {
} zle && [[ $HISTNO -eq $HISTCMD ]] && print -s -r -- "$PREBUFFER$BUFFER"
} echo "prebuffer: '$PREBUFFER'"
} return $1
} }
}
} $ for i in *
} for> do
} for> echo<INTERRUPT>prebuffer: 'for i in *
} do
} '
}
} $
torch% echo $ZSH_VERSION $ZSH_PATCHLEVEL
4.3.10-dev-1 1.4940
torch% TRAPINT () {
function> zle && [[ $HISTNO -eq $HISTCMD ]] && print -s -r -- "$PREBUFFER$BUFFER"
function> echo "prebuffer: '$PREBUFFER'"
function> return $1
function> }
torch% for i in *
for> do
for> echoprebuffer: ''
torch%
Messages sorted by:
Reverse Date,
Date,
Thread,
Author