Discussion:
Send a command to the command prompt from the command line
Paolo Bolzoni
2014-09-25 16:16:48 UTC
Permalink
Dear list,

Sometime I clear the screen to exec a command with a long output
that I later navigate using the tmux history ability.

So far so good, without tmux the command "reset" works fine. But
with tmux I have to use clear and write clear-history in tmux
command prompt. I would like to write an alias to make both
things in one typing a single command in my shell. Is that
possible?

Cheers,
Paolo
Nicholas Marriott
2014-09-25 16:27:51 UTC
Permalink
Try:

alias c='clear; [ -n "$TMUX" ] && tmux clear-history'
Post by Paolo Bolzoni
Dear list,
Sometime I clear the screen to exec a command with a long output
that I later navigate using the tmux history ability.
So far so good, without tmux the command "reset" works fine. But
with tmux I have to use clear and write clear-history in tmux
command prompt. I would like to write an alias to make both
things in one typing a single command in my shell. Is that
possible?
Cheers,
Paolo
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
Paolo Bolzoni
2014-09-25 16:38:16 UTC
Permalink
Works perfect, I knew I was missing the obvious. But I didn't know I
could use --tmux command-- to send a command to che current tmux.

Thanks!

On Thu, Sep 25, 2014 at 6:27 PM, Nicholas Marriott
Post by Nicholas Marriott
alias c='clear; [ -n "$TMUX" ] && tmux clear-history'
Post by Paolo Bolzoni
Dear list,
Sometime I clear the screen to exec a command with a long output
that I later navigate using the tmux history ability.
So far so good, without tmux the command "reset" works fine. But
with tmux I have to use clear and write clear-history in tmux
command prompt. I would like to write an alias to make both
things in one typing a single command in my shell. Is that
possible?
Cheers,
Paolo
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
Loading...