Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Calling interactive command inside widget



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