Subj : Re: changing the prompt to show only a few directories To : Klaus Meinhard From : Steve Date : Thu Feb 07 2002 07:48 pm From: Steve@f3.n342.z1.cereal.mv.com (Steve) Subject: Re: changing the prompt to show only a few directories From: "E. S. (Steve) Fabian" Amit wrote: > > How can I change the prompt in 4NT so that it only displays a certain number > of characters in the prompt? Sometimes when I'm deep inside the directory > hierarchy, the prompt takes up an entire line Klaus Meinhard wrote: > > take a look at @left, @instr, @right, @if and you'll be able to come up > with a solution that fulfi8lls your need, e.g. (all on one line) > > set prompt=%%@if[%@len[%_cwds] gt > 43,%@left[20,%_cwds]...%@right[20,%_cwds],%_cwds] Actually, you need to backquote the string so it would be evaluated when the prompt is displayed: prompt `%@if[%@len[%_cwds] gt 43,%@left[20,%_cwds]...%@right[20,%_cwds],%_cwds]` another technique is to force a newline after the path, e.g. prompt $P$_$g will show: c:\this-is-a-very-long-path-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxx > -- E. S. "Steve" Fabian ESFabian@BellAtlantic.net POB 1540, Cherry Hill, NJ 08034 Telephone: 856-354-1752 EMPIRE Consultants, Inc. Director, Software Development ------------------------------------------------------------------- -- |Fidonet: Steve 1:342/3 | | Origin: The Cereal Port BBS (603)899-3335 199.125.78.133 (1:132/152) --- # Origin: (1:132/152.4) * Origin: Baddog BBS (1:218/903) .