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

Re: Howto to print ENTER to zle-buffer?



On Dec 13,  4:01pm, Andy Spiegl wrote:
}
}   print -z "command-to-run args"
}   zle accept-line
} 
} Can zsh be told somehow to "press enter"?

If you're doing this in a startup file, you probably want

    print -S "command-to-run args"
    command-to-run args

That is, explicitly place the command into the history, and then run
it directly.

If for some reason you really need the command executed within ZLE,
you will have to create a zle-line-init widget that will accept the
line and then remove or update itself that so it doesn't run it a
second time.



Messages sorted by: Reverse Date, Date, Thread, Author