Defines aliases:
ls(path)
edit(filename)
dir(path)
pwd()
cd(path)
void edit(char *file)
{
if ((e = getenv("EDITOR")))
sprintf(s, "start %s %s", e, file);
else
sprintf(s, "start notepad %s", file);
} else {
if ((e = getenv("EDITOR")))
sprintf(s, "%s %s", e, file);
else
sprintf(s, "xterm -e vi %s &", file);
}
}
void ls(char *path=0)
{
char s[256];
strcpy(s, (!strcmp(
gSystem->
GetName(),
"WinNT")) ?
"dir /w " :
"ls ");
if (path) strcat(s,path);
}
void dir(char *path=0)
{
char s[256];
if (path) strcat(s,path);
}
const char *pwd()
{
}
const char *cd(char *path=0)
{
if (path)
return pwd();
}
void bexec2(char *macro)
{
printf("in bexec dir=%s\n",pwd());
if (
gROOT->IsBatch()) printf(
"Processing benchmark: %s\n",macro);
}
- Author
- Rene Brun
Definition in file rootalias.C.