![]() |
Problem with aliasing
I'm using kdialog a lot in a Bash script, and I always use the option --title="$title". So I made an alias, alias kdialog="kdialog --title=\"$title\"". The line alias|grep kdialog in the script outputs alias kdialog='kdialog --title="Audio Konvert 0.3.0"', but the title of a dialog created with kdialog --yesno "test" has a title of "Question - KDialog."
I'm trying to keep this all in one script. |
Anyone?
|
Funny; it works for me. What version of KDE are you using?
|
notroot[0:~]& rpm -q kdebase
kdebase-3.5.0-0.1.fc4 notroot[0:~]& Mabe it's something wrong with somethinge else in the script...? Should I attach it (It's 37KB)? |
Same KDE version I have, so it's nothing to do with 3.5. Have you tried doing this normally?
:
title="Audio Konvert 0.3.0" |
Now try putting that in a shell script.
|
Quote:
Perhaps use a function instead? :
function kdialogFunctions will only be around for the duration of the script, I believe (unless you put them in bashrc or similar), but they are called the same way you would call a regular command or alias: :
kdialog --yesno "Testing, 1, 2, 3." |
Aliases are disabled for non-interactive shells (shell scripts) according to my book so I guess your experiment confirms it.
|
Good idea Arevos :)
:
#!/bin/bashalmost works. The title works, but the content is "Testing," and excludes " 1, 2, 3." |
:
`kde-config --prefix`/bin/kdialog --title="$title $* #or $@ |
| All times are GMT -5. The time now is 1:59 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC