Sample Header Ad - 728x90

Tcsh: Searching history using Ctrl-P and Ctrl-N

3 votes
1 answer
1564 views
What are the equivalent functions in tcsh for the following zsh functions? up-line-or-history history-beginning-search-backward down-line-or-history history-beginning-search-forward I have the following code in my **,zsh** that I am hoping to translate **in full** to my ".tcsh". The code below is supposed to bind Ctrl-P and Ctrl-N to such history search functions: up-line-or-history-beginning-search () { if [[ -n $PREBUFFER ]]; then zle up-line-or-history else zle history-beginning-search-backward fi } down-line-or-history-beginning-search () { if [[ -n $PREBUFFER ]]; then zle down-line-or-history else zle history-beginning-search-forward fi } zle -N up-line-or-history-beginning-search zle -N down-line-or-history-beginning-search bindkey '^P' up-line-or-history-beginning-search bindkey '^N' down-line-or-history-beginning-search Any ideas about what the equivalent tcsh code would look like?
Asked by Amelio Vazquez-Reina (42851 rep)
Sep 5, 2012, 08:22 PM
Last activity: Mar 23, 2021, 06:05 PM