
konsolescripts
Source (link to git-repo or to original if based on someone elses unmodified work):
There are some general commands predefined and an easy way to define your own. More documentation in script.
Installation:
just save file to ~/.konsolescripts and add this line in ~/.bashrc:
. ~/.konsolescripts
(dot, SPACE, tilde, slash and so on..)
full changelog in file.
* 1.0.9
- Initial kde4-support (for yakuake)
* 1.0
- Added some commands
- trapped ctrl+c to prevent wrong label if command is cancelled.
* 0.84.0
- Fixed typo and added quotes, which caused problem when using several su-commands on the top of the other.
- Optimized KONSOLESCRIPTS_addCommand. No need for temporary file anymore and shell starts faster.
* 0.83.4
- New commands: yum, locate, updatedb and chroot.
- Bugfix: Removing temp-files with "rm -f" to prevent aliases like rm="rm -i" asking questions. Thanks to Vladimir Pouzanov, who noticed this bug.
* 0.83.3
- Some temporary files wasn't removed.($TMPDIR/konsolescripts.*)
- some bugfixes to linux32 and linux64 commands.
* 0.83.1
- Added new commands: linux32 and linux64
- Fixed labeling problem in ssh and ftp when using root. thanks to Nissa.
* 0.83.0
- added support for _upcoming_ yakuake.
(patch for yakuake-2.7.5 is also on downloads, but I won't provide any support for installing it. It will be included in upcoming yakuake versions).
- Fixed some problems with functions with "-", like apt-get.
Ratings & Comments
19 Comments
hello!.. have you news for us to new release of konsolescripts for Konsole and Yakuare? I have a question... ... how to install patch for yakuake into openSUSE 10.2 with rpm of yakuake. I don't found files to patch that you have provided. best regars jscm
Hi! If you have x86_64, you can use this rpm: http://ota.tr.spt.fi/~fisu81/suse/10.2/x86_64/yakuake-2.7.5-50.fsu.x86_64.rpm There is also src.rpm. I haven't build i586, so you have to do it yourself: 1. Get this src.rpm -file http://ota.tr.spt.fi/~fisu81/suse/10.2/src/yakuake-2.7.5-50.fsu.src.rpm 2. build it: rpmbuild --rebuild yakuake-2.7.5-50.fsu.src.rpm
...and very useful! However I'm getting an error every time I use vim or locate: "bash: [: !=: unary operator expected" The error isn't a showstopper as both vim and locate proceed to work correctly, but it is annoying to see the error being spit out all the time. I'm using the patched Yakuake on Slackware current. LocoMojo
Oops, I forgot to mention that I don't get this error in Konsole...only Yakuake. LocoMojo
Thanks reporting. I couldn't reproduce this. Would you send me some more data, so I can try to fix it: - Take new konsole tab - Run: bash -x - Run: vim test.txt - Quit vim - Copy scrollback from the line "vim test.txt" to the end. (Make sure, error is there too) - paste it to http://pastebin.ca (or something similar) and send link to me(here or send it by email).
I did exactly what you said, but the errors don't reproduce after I do bash -x. Once I get out of bash -x the errors come back. By the way, in addition to the abovementioned commands, I also get this error when I do 'top' and 'man'. Let me know if you still want the output of bash -x even though the errors aren't spitting out. Also remember that this is a Yakuake only problem...this is NOT a problem for Konsole. LocoMojo
Update: I figured out the problem. The errors were due to a misconfigured prompt in my .bashrc file, specifically the part of my prompt that put my path in Yakuake's titlebar. My bad, sorry. Interestingly, I've been using this prompt for well over a year now and I've never had any problems with it until I started using konsolescripts. Thanks again for a very useful script! LocoMojo
I get only my userName in may Konsole tabs. I don't know why. my standard prompt is: 08:20 jscm:~ > if I run commands like wget, ftp, top, vi.. I don't get my Konsole tab renamed but I see always my username (jscm) in tab. What can I do?? I use SuSE 10.1 with Konsole 1.6.4
That's weird. Would you send me some information by email: rpm -q vim type -a vi And then tricy one: First write KONSOLESCRIPTS_ and then press couple times tab, so bash tries to complete and gives list on functions beginning with KONSOLESCRIPTS_. Output should be something like this: http://pastebin.ca/152975
I tried what you suggest me. 17:43 jscm:/ > rpm -q vim vim-6.4.6-19 17:43 jscm:/ > type -a vi vi is /bin/vi vi is /usr/bin/vi 17:43 jscm:/ > KO ......[NOTHING] I see that I don't find any KONSOLESCRIPTS_????? my vim isn't the newer but I don't think that it could be a problem. I haven't all information that I've saw in your link. Why??? What do I have to do??
I'm not sure, this is best place to give support but are you sure, you have line: ". ~/.konsolescripts" (dot, space, pathToFile and without quotation marks) in ~/.bashrc and script saved in ~/.konsolescripts ?
Ok... I understand!!! I haven't use "dot and space" to pin up set script. I had used ./path/script so it was started only when konsole started.. after my konsole didn't use functions. Now I see 18:19 jscm:~ > KONSOLESCRIPTS_ KONSOLESCRIPTS_addCommand KONSOLESCRIPTS_SUBLABEL_make KONSOLESCRIPTS_getCommand KONSOLESCRIPTS_SUBLABEL_man KONSOLESCRIPTS_KONSOLE_renameSession KONSOLESCRIPTS_SUBLABEL_nano KONSOLESCRIPTS_KONSOLE_sessionName KONSOLESCRIPTS_SUBLABEL_pico KONSOLESCRIPTS_renameSession KONSOLESCRIPTS_SUBLABEL_sftp KONSOLESCRIPTS_restoreSession KONSOLESCRIPTS_SUBLABEL_smart KONSOLESCRIPTS_runCommand KONSOLESCRIPTS_SUBLABEL_ssh KONSOLESCRIPTS_SUBLABEL_apt KONSOLESCRIPTS_SUBLABEL_sudo KONSOLESCRIPTS_SUBLABEL_apt_get KONSOLESCRIPTS_SUBLABEL_svn KONSOLESCRIPTS_SUBLABEL_cvs KONSOLESCRIPTS_SUBLABEL_vi KONSOLESCRIPTS_SUBLABEL_ftp KONSOLESCRIPTS_SUBLABEL_vim KONSOLESCRIPTS_SUBLABEL_linux32 KONSOLESCRIPTS_SUBLABEL_yum KONSOLESCRIPTS_SUBLABEL_linux32Andlinux64 KONSOLESCRIPTS_which KONSOLESCRIPTS_SUBLABEL_linux64 Sorry.. I didn't see space between . and path because my font size is really small, i use 1680x1050 and firefoz have tiny text that i haven't changed. thanks for you help.
Very useful. Some kind of problem on my machine: > ssh root@192.168.0.1 Tab displays: nissa@192.168.0.1 instead of root@192.168.0.1 To make it work on my machine I have replaced the following lines: L376: userName=`echo "$parameters" | sed s/@.*$// | sed s/^[^\ ]*\ //g` L385: local computer="$(echo "$parameters" | sed 's/^.*@//')"
Thanks. I fixed it in 0.83.1.
http://www.kde-look.org/content/show.php?content=30372
thanks a lot!
Great idea! But how about Yakuake? When I'm running dcop --list-sessions --username user under Yakuake, is's returning 0. Is there a way to improve Yakuake this way?
Are you sure you haven't sshed into another box? This has happened to me before without me realising it. ;) Otherwise dcop works perfectly for me.