开发者

How to remember multiple tabs' session in terminal? (Alike FF session manager)

开发者 https://www.devze.com 2023-03-06 16:13 出处:网络
how does one \"undo close-tab\" in terminal? And quite related to it, is it possible to remember a session of tabs in terminal?

how does one "undo close-tab" in terminal? And quite related to it, is it possible to remember a session of tabs in terminal?

I mean (alike Firefox) if I close all tabs in a particular terminal window, how do I open with same the next day?

Its really 开发者_如何学Gouseful to remember the terminal session for people like me who use multiple tabs a lot, and do not wish to start the next day with remembering what (and whereall) one was working, when one left the desk the day before.

In mouse right-click menu of gnome-terminal, one could easily (and I have) mistakenly click close tab instead of 'Copy'and lost track of what and where one was before selecting the text selected. In this case, undo closed-tab will serve a great purpose (available in Firefox already)

Thanks!

--V


For the gnome terminal, you can use

gnome-terminal --profile=〈your profile〉 --save-config=〈file〉

I launch it as a background task to save the terminal state periodically.


"termit" can save sessions and is scriptable in lua: https://github.com/nonstop/termit/wiki I don't know about an "undo close tab" feature, though.

For reference, my termit lua config can be found here: https://github.com/thet/dotfiles-termit


On Linux, gnome-terminal is able to load multiple tabs with different working directories. Like termit (which is much more flexible due to it's lua scripting interface), it doesn't have a "undo close tab" feature.

Open Gnome terminal with multiple tabs, each one in another working directory: gnome-terminal --tab --working-directory=/home --tab --working-directory=~ --tab --working-directory=/opt.

Open Gnome terminal with multiple tabs and one base working directory: gnome-terminal --working-directory=/home --tab --tab --tab.

For more options do: gnome-terminal --help-all.


The gnome terminal doesn't have such features, but if you're open to change you could try konsole, it has some nice 'save session' options you could find helpful, though nothing about re-opening accidentally closed tabs, as far as I know.

The other thing, if you're particular about your desktop, is that KDE's konsole might not fit all too well within Gnome.

0

精彩评论

暂无评论...
验证码 换一张
取 消