Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Calling interactive command inside widget
- X-seq: zsh-users 21441
- From: Evgeny Zajcev <lg.zevlg@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Calling interactive command inside widget
- Date: Wed, 13 Apr 2016 00:58:04 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=Zpvyy2z7EeW65b3erwPj4EG+sMHrX4m/CBy6p7bwQnM=; b=pZEw+Ey924MWvxaAF717NDcdcxqYxPPCQnePd5gDi+Ukiv6SDbszriEsf9J1bW1BCc jNrVvTliTBjF8QD1bcMl85Jg6Mng2Ib1PZM08tP5nYwmU38Rche8pmJH7amnNcfukdyF bnZOeFC8Z60o1TDjTIxM5ATGPDOdNxsBvOnRVofPecDa5DSoj8urbgHMa5931r57HRmn v8J9FaxmvQek9pbNDqGceuAFOZL0YJGkIRlF9bzGEA67bt4+dsPUbMmawqA9MwNsPoUn 9cyYV0rsoH74TIYXmETQNB/piOYH2XvLVuChBrLn4/T6oZSeqE6jPJj+pOJyz85uNSWT 4OBw==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
I always had next widget in my zprofile
my-run-help () {
words=(${=BUFFER})
if [[ $words[1] = sudo ]]
then
run-help $words[2]
else
run-help $words[1]
fi
zle reset-prompt
}
zle -N my-run-help
bindkey "^[h" run-help
so when I type in prompt something like "sudo adduser xxx" and want
interactive help on adduser I just press M-h
It was always working, however on my fresh Ubuntu install, I've got:
adduser is /usr/sbin/adduser
Missing filename ("less --help" for help)
I'v created simple widget like:
just-run-man () {
man man
}
zle -N just-run-man
bindkey "^[h" just-run-man
And also got
Missing filename ("less --help" for help)
What should I do to get desired behaviour?
I'm using zsh 5.0.2 (x86_64-pc-linux-gnu) under Ubuntu, my PAGER is less
thanks
--
lg
Messages sorted by:
Reverse Date,
Date,
Thread,
Author