Is there a way... - Suse
This is a discussion on Is there a way... - Suse ; I have some programs I run from a command line. The entries get to be
fairly long so having the ANSI keys available would sure help editing my
fat finger efforts. Is there a way to configure the Konsole terminal ...
-
Is there a way...
I have some programs I run from a command line. The entries get to be
fairly long so having the ANSI keys available would sure help editing my
fat finger efforts. Is there a way to configure the Konsole terminal to
recognize (and use) the cursor movement arrows, etc. to edit command lines?
For now I'm using command session from xemacs but that seems like overkill.
--
Will Honea
--
Posted via a free Usenet account from http://www.teranews.com
-
Re: Is there a way...
Will Honea wrote:
> I have some programs I run from a command line. The entries get to be
> fairly long so having the ANSI keys available would sure help editing my
> fat finger efforts. Is there a way to configure the Konsole terminal to
> recognize (and use) the cursor movement arrows, etc. to edit command lines?
>
> For now I'm using command session from xemacs but that seems like overkill.
Do you have an example of such a command and what are the things that
are differently? Are there things that are the same, yet differently
each time you use it? Where do these keys come from?
I would either use an alias, or write a script, depending on what you
need to do.
houghi
--
This space left blank intentionaly
-
Re: Is there a way...
On Mon, 03 Dec 2007 21:51:39 -0700, Will Honea wrote:
> I have some programs I run from a command line. The entries get to be
> fairly long so having the ANSI keys available would sure help editing my
> fat finger efforts. Is there a way to configure the Konsole terminal to
> recognize (and use) the cursor movement arrows, etc. to edit command
> lines?
>
> For now I'm using command session from xemacs but that seems like
> overkill.
>
> --
> Will Honea
What shell are you using? Bash, the default shell in Linux provides
command line editing using the left and right arrow keys. On my konsole
with bash as the shell and xterm as the TERM setting (all default
settings) I have the following basic options..
left arrow: move left one character
right arrow: move right one character
home: move to the beginning of the line
end: move to the end of the line
ctl+left arrow: move to the start of the previous word
ctl+right arrow: move the the end of the current word
delete: remove the character in front of the cursor
backspace: remove the character under the cursor
Plus you have all kinds of goodies in command-line completion.
JohnK
-
Re: Is there a way...
Will Honea in <4754d110$0$26094$88260bb3@free.teranews.com> :
> I have some programs I run from a command line. *The entries get to be
> fairly long so having the ANSI keys available would sure help editing my
> fat finger efforts. *Is there a way to configure the Konsole terminal to
> recognize (and use) the cursor movement arrows, etc. to edit command
> lines?
I love to use *zsh*,it has much features about commandline editing,
completion, history, etc.
P.
--
mailto
eter@dharma.dyn-o-saur.com
-
Re: Is there a way...
On Tue, 4 Dec 2007, JohnK wrote:-
>left arrow: move left one character
>right arrow: move right one character
>home: move to the beginning of the line
>end: move to the end of the line
>ctl+left arrow: move to the start of the previous word
>ctl+right arrow: move the the end of the current word
>delete: remove the character in front of the cursor
>backspace: remove the character under the cursor
You missed out the up and down arrows:
up arrow: move back one command in the command history
down arrow: move forward one command in the command history
Regards,
David Bolt
--
www.davjam.org/lifetype/ www.distributed.net: OGR@100Mnodes, RC5-72@15Mkeys
| SUSE 10.1 32bit | openSUSE 10.2 32bit | openSUSE 10.3 32bit
SUSE 10.0 64bit | SUSE 10.1 64bit | openSUSE 10.2 64bit |
RISC OS 3.11 | RISC OS 3.6 | TOS 4.02 | openSUSE 10.3 PPC
-
Re: Is there a way...
David Bolt wrote:
> On Tue, 4 Dec 2007, JohnK wrote:-
>
>
>
>>left arrow: move left one character
>>right arrow: move right one character
>>home: move to the beginning of the line
>>end: move to the end of the line
>>ctl+left arrow: move to the start of the previous word
>>ctl+right arrow: move the the end of the current word
>>delete: remove the character in front of the cursor
>>backspace: remove the character under the cursor
>
> You missed out the up and down arrows:
>
> up arrow: move back one command in the command history
> down arrow: move forward one command in the command history
And what I use is a few letters of the comman and then PgUp to move up
in the list of commands that started with those letters in
..bash_history.
What the PgDn does I leave for the people who try it out. ;-)
Also if you do not want the command to end up in .bash_history, start
with a space. :-D
houghi
--
This space left blank intentionaly
-
Re: Is there a way...
On Tue, 4 Dec 2007, houghi wrote:-
>And what I use is a few letters of the comman and then PgUp to move up
>in the list of commands that started with those letters in
>.bash_history.
>
>What the PgDn does I leave for the people who try it out. ;-)
>
>Also if you do not want the command to end up in .bash_history, start
>with a space. :-D
And if you're really trying to hide your tracks, you could use this:
mv ~/.bash_history ~/.bash_history~ ; bash ; mv ~/.bash_history~ ~/.bash_history
^
That space hides the rest of the command line, which moves the shell
history before starting up a new shell. All the history created in the
new shell gets destroyed when you quit the new shell, and so there's no
log of what was done.
Regards,
David Bolt
--
www.davjam.org/lifetype/ www.distributed.net: OGR@100Mnodes, RC5-72@15Mkeys
| SUSE 10.1 32bit | openSUSE 10.2 32bit | openSUSE 10.3 32bit
SUSE 10.0 64bit | SUSE 10.1 64bit | openSUSE 10.2 64bit |
RISC OS 3.11 | RISC OS 3.6 | TOS 4.02 | openSUSE 10.3 PPC
-
Re: Is there a way...
Will Honea wrote:
> I have some programs I run from a command line. The entries get to be
> fairly long so having the ANSI keys available would sure help editing my
> fat finger efforts. Is there a way to configure the Konsole terminal to
> recognize (and use) the cursor movement arrows, etc. to edit command
> lines?
>
> For now I'm using command session from xemacs but that seems like
> overkill.
Brain fart time! Have to stop doing things when it gets that late - the key
handling from the terminal session don't transfer to the executable being
run. If the app doesn't implement line editing, there's no way that the
shell settings are going to help! I feel pretty foolish reading this after
a night's sleep.
--
Will Honea
--
Posted via a free Usenet account from http://www.teranews.com
-
-
Re: Is there a way...
Gary Gapinski wrote:
> Try http://utopia.knoware.nl/~hlub/uck/rlwrap/.
Looks nice - but my PITA program is commercial so I'm not sure how well it
plays. Xemacs running a shell does the trick as well as providing
cut/paste/edit of the history so this isn't pressing. I'll look a bit more
at rlwrap, tho. Might be useful even if it won't handle the particular app
that's bugging me.
--
Will Honea
--
Posted via a free Usenet account from http://www.teranews.com