You are not logged in.
Stupid question may be.
Is there any terminal emulator is or that can be configured to work upwards?
I would make love to a terminal that starts as normal but remains the input in the same place and kicking the old logs downward.
Last edited by Gulver (2013-06-22 15:06:01)
Offline
None that I'm aware of, and perhaps for good reason;
http://serverfault.com/questions/152310 … -text-flow
http://unix.stackexchange.com/questions … nal-output
Offline
It has been asked on these forums previously too: https://bbs.archlinux.org/viewtopic.php … 65#p903365
Some of the responses on serverfault don't make much sense: yes it would be silly to cat a file backwards, but you could cat it normally, then just "scroll" the output down far enough so there is space for a new prompt above it.
The other response about modifying the bash source code is ridiculous for two reasons: this isn't handled by the shell: the shell just reads input and write's output - it knows nothing of terminals. If anything one could revise the code of a virtual terminal.
But simply putting the prompt above the last text isn't that helpful. That much is easy:
PS1="\[\033[1;1H\]> \[\033[K\]"The tricky part is that when a second command is then run, it just dumps its output over the previous commands output rather than scrolling it down.
One could, on the other hand, have two windows (even joined seemlessly to look like one) and commands were entered in one, and formatted output was placed in the other.
Or ... this is the 5 minute version which is pretty limited - but it is a bit of proof-of-concept prototype
#!/bin/bash
LINES=32
rm -f /tmp/sh{1,2}
clear
while read -p "> " line; do
printf "\n> %s\n" "$line" > /tmp/sh1
$line >> /tmp/sh1 2>&1
cat /tmp/sh2 >> /tmp/sh1
mv /tmp/sh1 /tmp/sh2
clear
echo
head -$LINES /tmp/sh2
tput cup 0 0
done
clearLast edited by Trilby (2013-06-22 22:11:17)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Your idea seems great, and fairly easy as far as I catched it, since there are no simple works that has been done.
I'd use a terminal emulator on background which, if I understood you right, can be parted as two terms.
But the thing is that, forget about cultivate, I have no idea how to use that script as it is ![]()
Also, as far as I could have search this can be only accessible solution so far ![]()
Last edited by Gulver (2013-06-22 23:38:37)
Offline
The two terms themselves wouldn't do it. You'd need to set up some piping or redirection. What made me think of that was using ScreenShell with vim where I could edit commands in one terminal window and have their output pass through a lexer and be displayed on the other (I used to do this for R scripts, the code for it is on my github).
But what I posted in that shell script is probably a much better approach. If I get around to it I might code it properly, but it mostly works as it is.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
The two terms themselves wouldn't do it. You'd need to set up some piping or redirection. What made me think of that was using ScreenShell with vim where I could edit commands in one terminal window and have their output pass through a lexer and be displayed on the other (I used to do this for R scripts, the code for it is on my github).
But what I posted in that shell script is probably a much better approach. If I get around to it I might code it properly, but it mostly works as it is.
Since no code-friendly linuxer took time for it, I'm guessing it is meaningless, yet might be of use for some. I would scratch around that scripts, thanks!
Offline
What should `echo -e 'foo\nbar'` result in then? Or `cat /some/file`? The idea works for command histories, but not well for command _output_.
In the simple "reverse-everything" case you could just run a wrapper around your shell. If however you don't want "cat" etc to print files in reverse you'd need to modify the shell.
EDIT: Oh damn. This was supposed to end up in the newer https://bbs.archlinux.org/viewtopic.php?id=179261 ![]()
I should get some sleep ![]()
Last edited by Blµb (2014-03-29 22:05:36)
You know you're paranoid when you start thinking random letters while typing a password.
A good post about vim
Python has no multithreading.
Offline
Can't the terminal just ALWAYS output a:
Reverse Line Feed (\e[M)
Instead of a:
Normal Line Feed (\n)
Then commands could just be used accordingly. ie)
ls -la | tac
Instead of:
ls -la | cat
However, it looks like gnome-terminal doesn't really support the Reverse Line Feed. My examples are below:
== Actual ==
Line Feed
$ echo -n -e '1\n2\n3\n'
1
2
3
$
Reverse Line Feed
$ echo -n -e '\e[M\e[M1\e[M2\e[M3\e[M'
$
== Expected ==
Line Feed
$ echo -n -e '1\n2\n3\n'
1
2
3
$
Reverse Line Feed
$
3
2
1
$ echo -n -e '\e[M\e[M1\e[M2\e[M3\e[M'
== More Info ==
Testing was done with:
/bin/bash
In:
gnome-terminal 3.61
Offline