diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2021-09-05 21:14:06 +0200 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2021-09-05 21:14:06 +0200 |
commit | 7f57499fc9439630cbb804af543eff54f59fd739 (patch) | |
tree | 60eb6baa382d81f154c4b2e12b590cdacf451774 | |
parent | 3637af2b7405b40ee3478c3a95fddb7accf3e6bf (diff) | |
download | zsh-7f57499fc9439630cbb804af543eff54f59fd739.tar.gz zsh-7f57499fc9439630cbb804af543eff54f59fd739.zip |
Add patch to set default pager to /usr/bin/pager instead of more.
Drop according sed call from debian/rules which didn't catch .zwc
files.
Gbp-Dch: Full
-rw-r--r-- | debian/patches/series | 1 | ||||
-rw-r--r-- | debian/patches/use-pager-instead-of-more-by-default.patch | 104 | ||||
-rwxr-xr-x | debian/rules | 2 |
3 files changed, 105 insertions, 2 deletions
diff --git a/debian/patches/series b/debian/patches/series index b5b21fc96..621cf7a74 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -5,3 +5,4 @@ example-shebang.patch completion-dscverify.diff cherry-pick-d128bc0b-45731-debsnap-new-completion-function.patch cherry-pick-754658af-Fix-copy-paste-error-in-earlier-commit-that-broke-git-stash-drop-completion.patch +use-pager-instead-of-more-by-default.patch diff --git a/debian/patches/use-pager-instead-of-more-by-default.patch b/debian/patches/use-pager-instead-of-more-by-default.patch new file mode 100644 index 000000000..818b1ab5d --- /dev/null +++ b/debian/patches/use-pager-instead-of-more-by-default.patch @@ -0,0 +1,104 @@ +Description: Use /usr/bin/pager instead of more by default + Similar issue as with https://bugs.debian.org/993539, just for a + different setting. Replaces the according sed call in debian/rules. +Bug-Debian: https://bugs.debian.org/993539 +Forwarded: not-needed +Author: Axel Beckert <abe@debian.org> + +--- a/Completion/Base/Widget/_complete_debug ++++ b/Completion/Base/Widget/_complete_debug +@@ -24,7 +24,7 @@ + + if (( debug_fd != -1 )); then + zstyle -s ':completion:complete-debug::::' pager pager +- print -sR "${pager:-${PAGER:-${VISUAL:-${EDITOR:-more}}}} ${(q)tmp} ;: $w" ++ print -sR "${pager:-${PAGER:-${VISUAL:-${EDITOR:-/usr/bin/pager}}}} ${(q)tmp} ;: $w" + _message -r "Trace output left in $tmp (up-history to view)" + if [[ $compstate[nmatches] -le 1 && $compstate[list] != *force* ]]; then + compstate[list]='list force messages' +--- a/Functions/MIME/zsh-mime-handler ++++ b/Functions/MIME/zsh-mime-handler +@@ -288,11 +288,11 @@ + # We need to page the output. + # Careful in case PAGER is a set of commands and arguments. + local -a pager +- zsh-mime-contexts -a $suffix pager pager || pager=(${=PAGER:-more}) ++ zsh-mime-contexts -a $suffix pager pager || pager=(${=PAGER:-/usr/bin/pager}) + if [[ -n $stdin ]]; then + cat $argv | $execargs | $pager + else +- $execargs | eval ${PAGER:-more} ++ $execargs | eval ${PAGER:-/usr/bin/pager} + fi + elif [[ $no_bg = yes || $flags = *needsterminal* || -z $DISPLAY ]]; then + # Needs a terminal, so run synchronously. +--- a/Functions/Misc/mere ++++ b/Functions/Misc/mere +@@ -86,4 +86,4 @@ + fi | + nroff -T$terminal -man | $col -x + ) | +-${=MANPAGER:-${PAGER:-more}} -s ++${=MANPAGER:-${PAGER:-/usr/bin/pager}} -s +--- a/Functions/Misc/nslookup ++++ b/Functions/Misc/nslookup +@@ -21,7 +21,7 @@ + zstyle -s ':nslookup' prompt tmp && pmpt=(-p "$tmp") + zstyle -s ':nslookup' rprompt tmp && pmpt=("$pmpt[@]" -r "$tmp") + zstyle -s ':nslookup' pager tmp && +- [[ -z "$pager" ]] && pager="${opager:-more}" ++ [[ -z "$pager" ]] && pager="${opager:-/usr/bin/pager}" + (( $#pmpt )) || pmpt=(-p '> ') + + zpty nslookup command nslookup "${(q)@}" +--- a/Functions/Misc/run-help ++++ b/Functions/Misc/run-help +@@ -29,7 +29,7 @@ + return 0 + elif [[ -n "${HELPDIR:-}" && -r $HELPDIR/$1 && $1 != compctl ]] + then +- ${=PAGER:-more} $HELPDIR/$1 ++ ${=PAGER:-/usr/bin/pager} $HELPDIR/$1 + return $? + fi + +@@ -69,7 +69,7 @@ + (comp*) man zshcompsys;; + (zf*) man zshftpsys;; + (run-help) man zshcontrib;; +- (*) builtin functions ${what[(w)1]} | ${=PAGER:-more};; ++ (*) builtin functions ${what[(w)1]} | ${=PAGER:-/usr/bin/pager};; + esac;; + (*( is a * builtin)) + case ${what[(w)1]} in +--- a/Functions/Misc/run-help-svk ++++ b/Functions/Misc/run-help-svk +@@ -1 +1 @@ +-svk help ${${@:#-*}[1]} | ${=PAGER:-more} ++svk help ${${@:#-*}[1]} | ${=PAGER:-/usr/bin/pager} +--- a/Functions/Misc/run-help-svn ++++ b/Functions/Misc/run-help-svn +@@ -1 +1 @@ +-svn help ${${@:#-*}[1]} | ${=PAGER:-more} ++svn help ${${@:#-*}[1]} | ${=PAGER:-/usr/bin/pager} +--- a/Functions/Zftp/zfdir ++++ b/Functions/Zftp/zfdir +@@ -95,15 +95,15 @@ + fi + + if [[ -n $file && -f $file ]]; then +- eval ${PAGER:-more} \$file ++ eval ${PAGER:-/usr/bin/pager} \$file + else + if (zftp test); then + # Works OK in subshells +- zftp dir $* | tee $file | eval ${PAGER:-more} ++ zftp dir $* | tee $file | eval ${PAGER:-/usr/bin/pager} + else + # Doesn't work in subshells (IRIX 6.2 --- why?) + zftp dir $* >$file +- eval ${PAGER:-more} $file ++ eval ${PAGER:-/usr/bin/pager} $file + fi + fi + # } diff --git a/debian/rules b/debian/rules index 8d034450a..a820dfe83 100755 --- a/debian/rules +++ b/debian/rules @@ -132,8 +132,6 @@ override_dh_install-indep: dh_install -i # Doesn't this need to go before we zcompile stuff into .zwc files? -- Axel - sed -i -e 's,:-more,:-/usr/bin/pager,;' \ - debian/zsh-common/usr/share/zsh/functions/Misc/run-help sed -i -e '1!b;s:^#!.*[ /]zsh:#!/bin/zsh:;s#/usr/local/bin#/usr/bin#;' \ `find debian/zsh-common/usr/share/zsh/functions -type f` |