zsh-users
 help / color / mirror / code / Atom feed
* Start mc with every new shell
@ 2006-11-09 14:46 chesss
  2006-11-09 15:12 ` Peter Stephenson
  2006-11-09 15:32 ` Nikolai Weibull
  0 siblings, 2 replies; 7+ messages in thread
From: chesss @ 2006-11-09 14:46 UTC (permalink / raw)
  To: zsh-users

The only bit of of midnight-commander I really like is the ability to  
quickly press ctrl+o and get a nice scrollable listing of files, and the n  
press ctrl+o again to get back to zsh.

So how to start mc with every interactive shell, that too in 'minimized'  
mode?
I tried:
1. adding mc to .zshrc, but it hangs the chell . adding mc to .bashrc  
works.
2. looking for a macro app. So that I can send a series of keyboard  
strokes to start a new zsh shell, start mc and press ctrl+o. AFAIK, the  
concept of keyboard macros outside vi/emacs is pretty much unknown in unix  
world, so I'll explain: press a keystroke to send a 'series of  
keystrokes/hotkeys'.
Any such app for unix? I am not talking about macros in zsh, but in X(the  
whole PC)

 From mc's man page >>
			
			C-o    when the program is being run in the Linux or FreeBSD console or  
under an xterm, it
               will show you the output of the previous command.  When ran  
on the  Linux  console,
               the  Midnight  Commander uses an external program  
(cons.saver) to handle saving and
               restoring of information on the screen.



-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Start mc with every new shell
  2006-11-09 14:46 Start mc with every new shell chesss
@ 2006-11-09 15:12 ` Peter Stephenson
  2006-11-09 15:32 ` Nikolai Weibull
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Stephenson @ 2006-11-09 15:12 UTC (permalink / raw)
  To: zsh-users

chesss <testingagain@gmail.com> wrote:
> I tried:
> 1. adding mc to .zshrc, but it hangs the chell . adding mc to .bashrc  
> works.

Have you tried something like:

  if [[ -z $ZSH_IN_MC ]]; then
    export ZSH_IN_MC=1
    mc
  fi

which works for me (as far as I can see, anyway, I'm not an expert on mc)?
bash may have some automatic method of detection.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Start mc with every new shell
  2006-11-09 14:46 Start mc with every new shell chesss
  2006-11-09 15:12 ` Peter Stephenson
@ 2006-11-09 15:32 ` Nikolai Weibull
  2006-11-09 16:02   ` chesss
  1 sibling, 1 reply; 7+ messages in thread
From: Nikolai Weibull @ 2006-11-09 15:32 UTC (permalink / raw)
  To: chesss; +Cc: zsh-users

On 11/9/06, chesss <testingagain@gmail.com> wrote:
> The only bit of of midnight-commander I really like is the ability to
> quickly press ctrl+o and get a nice scrollable listing of files, and the n
> press ctrl+o again to get back to zsh.

Have you given screen(1) [1] a try?  It lets you multiplex one
terminal between many different applications so that you can have mc
in one "window" and a shell in another, completely independent of each
other.  It's not what you're asking about, but it may be what you'll
actually want in the end.

  nikolai

[1] http://www.gnu.org/software/screen/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Start mc with every new shell
  2006-11-09 15:32 ` Nikolai Weibull
@ 2006-11-09 16:02   ` chesss
  2006-11-10 16:15     ` Tobias Gruetzmacher
  0 siblings, 1 reply; 7+ messages in thread
From: chesss @ 2006-11-09 16:02 UTC (permalink / raw)
  To: zsh-users

>if [[ -z $ZSH_IN_MC ]]; then
 > export ZSH_IN_MC=1
 > mc
> fi

Works great! thanks. This requires an extra ctrl+o later, but thats
not much of a bother..

> It lets you multiplex one terminal between many different >applications so that you can have mc in one "window" and a shell in >another, completely independent of each other.

THe thing that I really want was a quick list of files/folders of the
current directory, without having to a.lose the prompt b.type
something>shift+pageup to see past text c.I hate 'ls'
mc gives a solution, since it syncs with pwd when in 'ctrl+o' mode !!
So I can just go about my business in zsh, then perss ctrl+o to see
the files, and ctrl+o back again to zsh!

Here's what I had in mind (initially):

http://h1.ripway.com/chesss/dirlist.png


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Start mc with every new shell
  2006-11-09 16:02   ` chesss
@ 2006-11-10 16:15     ` Tobias Gruetzmacher
  2006-11-10 19:10       ` chesss
  0 siblings, 1 reply; 7+ messages in thread
From: Tobias Gruetzmacher @ 2006-11-10 16:15 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 561 bytes --]

Hi,

On Thu, Nov 09, 2006 at 09:32:30PM +0530, chesss wrote:
> THe thing that I really want was a quick list of files/folders of the
> current directory, without having to a.lose the prompt b.type
> something>shift+pageup to see past text c.I hate 'ls'

Maybe you want to try viewglob? It may just be what you want, or maybe
not ;)

Greetings, Tobi

-- 
GPG-Key 0xE2BEA341 - signed/encrypted mail preferred
My, oh so small, homepage: http://portfolio16.de/
http://www.fli4l.de/ - ISDN- & DSL-Router on one disk!
Registered FLI4L-User #00000003

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Start mc with every new shell
  2006-11-10 16:15     ` Tobias Gruetzmacher
@ 2006-11-10 19:10       ` chesss
  2006-11-10 19:59         ` chesss
  0 siblings, 1 reply; 7+ messages in thread
From: chesss @ 2006-11-10 19:10 UTC (permalink / raw)
  To: zsh-users

> Maybe you want to try viewglob? It may just be what you want, or maybe
> not ;)
>
> Greetings, Tobi

When I switched to linux I knew it would take some time to discover
lil jem apps like I had in windows.Those apps that are just sooo
useful, yet only a small minority uses them. This is surely one of
them :)
Thanks tobi - viewglob is great and like all those nifty 'must-haves'
it should be pre-installed everywhere!


me is using this: to start viewglob with every shell btw:
    300 if [ -z "$VG_VIEWGLOB_ACTIVE" ] && [ "$DISPLAY" ]
    301     then exec vgseer -c zsh
    302 fi


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Start mc with every new shell
  2006-11-10 19:10       ` chesss
@ 2006-11-10 19:59         ` chesss
  0 siblings, 0 replies; 7+ messages in thread
From: chesss @ 2006-11-10 19:59 UTC (permalink / raw)
  To: zsh-users

Screw me! don't use the above command to start viewglob.
start with:

if [ -z "$VG_VIEWGLOB_ACTIVE" ] && [ "$DISPLAY" ]
then exec viewglob -c zsh
fi

There is a certain delay with this, but I coudln't care less, so I
didn't look  for a solution.

On 11/11/06, chesss <testingagain@gmail.com> wrote:
> > Maybe you want to try viewglob? It may just be what you want, or maybe
> > not ;)
> >
> > Greetings, Tobi
>
> When I switched to linux I knew it would take some time to discover
> lil jem apps like I had in windows.Those apps that are just sooo
> useful, yet only a small minority uses them. This is surely one of
> them :)
> Thanks tobi - viewglob is great and like all those nifty 'must-haves'
> it should be pre-installed everywhere!
>
>
> me is using this: to start viewglob with every shell btw:
>     300 if [ -z "$VG_VIEWGLOB_ACTIVE" ] && [ "$DISPLAY" ]
>     301     then exec vgseer -c zsh
>     302 fi
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-11-10 20:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-09 14:46 Start mc with every new shell chesss
2006-11-09 15:12 ` Peter Stephenson
2006-11-09 15:32 ` Nikolai Weibull
2006-11-09 16:02   ` chesss
2006-11-10 16:15     ` Tobias Gruetzmacher
2006-11-10 19:10       ` chesss
2006-11-10 19:59         ` chesss

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).