Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
3f845c29
Kaydet (Commit)
3f845c29
authored
Eki 19, 2011
tarafından
Petr Mladek
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
define bash completion also for 'loffice' wrapper (bnc#719656)
üst
369f22ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
23 deletions
+29
-23
generate-bash-completion
bin/generate-bash-completion
+29
-23
No files found.
bin/generate-bash-completion
Dosyayı görüntüle @
3f845c29
...
...
@@ -43,6 +43,7 @@ my @EXTENSIONS=("oxt");
# use "" if you want to disable any wrapper
my
%
APPS
=
(
office
=>
"libreoffice"
,
office_short
=>
"loffice"
,
master
=>
""
,
base
=>
"lobase"
,
calc
=>
"localc"
,
...
...
@@ -65,6 +66,7 @@ sub usage()
print "
$0
[
--
binsuffix
=
suffix
]
\
n
";
print "
\
t
\
t
[
--
compat
-
oowrappers
]
\
n
";
print "
\
t
\
t
[
--
office
=
wrapper_name
]
\
n
";
print "
\
t
\
t
[
--
office
-
short
=
wrapper_name
]
\
n
";
print "
\
t
\
t
[
--
master=wrapper_nam
e
]
\
n
";
print "
\
t
\
t
[
--
base
=
wrapper_name
]
\
n
";
print "
\
t
\
t
[
--
calc
=
wrapper_name
]
\
n
";
...
...
@@ -97,22 +99,25 @@ foreach my $arg (@ARGV) {
usage
();
exit
0
;
}
elsif
(
$arg
=~
/--compat-oowrappers/
)
{
$APPS
{
'office'
}
=
"ooffice"
;
$APPS
{
'master'
}
=
""
;
$APPS
{
'base'
}
=
"oobase"
;
$APPS
{
'calc'
}
=
"oocalc"
;
$APPS
{
'draw'
}
=
"oodraw"
;
$APPS
{
'impress'
}
=
"ooimpress"
;
$APPS
{
'math'
}
=
"oomath"
;
$APPS
{
'template'
}
=
"oofromtemplate"
;
$APPS
{
'unopkg'
}
=
"unopkg"
;
$APPS
{
'web'
}
=
"ooweb"
;
$APPS
{
'writer'
}
=
"oowriter"
;
$APPS
{
'office'
}
=
"openoffice"
;
$APPS
{
'office_short'
}
=
"ooffice"
;
$APPS
{
'master'
}
=
""
;
$APPS
{
'base'
}
=
"oobase"
;
$APPS
{
'calc'
}
=
"oocalc"
;
$APPS
{
'draw'
}
=
"oodraw"
;
$APPS
{
'impress'
}
=
"ooimpress"
;
$APPS
{
'math'
}
=
"oomath"
;
$APPS
{
'template'
}
=
"oofromtemplate"
;
$APPS
{
'unopkg'
}
=
"unopkg"
;
$APPS
{
'web'
}
=
"ooweb"
;
$APPS
{
'writer'
}
=
"oowriter"
;
$office_shell_function
=
"_ooexp_"
;
}
elsif
(
$arg
=~
/--binsuffix=(.*)/
)
{
$binsuffix
=
"$1"
;
}
elsif
(
$arg
=~
/--office=(.*)/
)
{
$APPS
{
'office'
}
=
"$1"
;
}
elsif
(
$arg
=~
/--office-short=(.*)/
)
{
$APPS
{
'office_short'
}
=
"$1"
;
}
elsif
(
$arg
=~
/--master=(.*)/
)
{
$APPS
{
'master'
}
=
"$1"
;
}
elsif
(
$arg
=~
/--base=(.*)/
)
{
...
...
@@ -182,19 +187,20 @@ sub print_suffixes_checks {
# skip the disabled wrapper
next
if
(
$APPS
{
$app
}
eq
""
);
if
(
$app
eq
"draw"
)
{
print_suffixes_check
(
$APPS
{
$app
},
@DRAWDOCS
);
}
if
(
$app
eq
"writer"
)
{
print_suffixes_check
(
$APPS
{
$app
},
@WRITERDOCS
,
@MASTERDOCS
);
}
if
(
$app
eq
"web"
)
{
print_suffixes_check
(
$APPS
{
$app
},
@WEBDOCS
);
}
if
(
$app
eq
"math"
)
{
print_suffixes_check
(
$APPS
{
$app
},
@MATHDOCS
);
}
if
(
$app
eq
"impress"
)
{
print_suffixes_check
(
$APPS
{
$app
},
@IMPRESSDOCS
);
}
if
(
$app
eq
"base"
)
{
print_suffixes_check
(
$APPS
{
$app
},
@BASEDOCS
);
}
if
(
$app
eq
"calc"
)
{
print_suffixes_check
(
$APPS
{
$app
},
@CALCDOCS
);
}
if
(
$app
eq
"master"
)
{
print_suffixes_check
(
$APPS
{
$app
},
@MASTERDOCS
);
}
if
(
$app
eq
"template"
)
{
print_suffixes_check
(
$APPS
{
$app
},
@TEMPLATES
);
}
# libreoffice should contain all...
if
(
$app
eq
"office"
)
{
print_suffixes_check
(
$APPS
{
$app
},
@DRAWDOCS
,
@WRITERDOCS
,
@MATHDOCS
,
@IMPRESSDOCS
,
@BASEDOCS
,
@CALCDOCS
,
@MASTERDOCS
,
@TEMPLATES
,
@WEBDOCS
);
}
if
(
$app
eq
"draw"
)
{
print_suffixes_check
(
$APPS
{
$app
},
@DRAWDOCS
);
}
if
(
$app
eq
"writer"
)
{
print_suffixes_check
(
$APPS
{
$app
},
@WRITERDOCS
,
@MASTERDOCS
);
}
if
(
$app
eq
"web"
)
{
print_suffixes_check
(
$APPS
{
$app
},
@WEBDOCS
);
}
if
(
$app
eq
"math"
)
{
print_suffixes_check
(
$APPS
{
$app
},
@MATHDOCS
);
}
if
(
$app
eq
"impress"
)
{
print_suffixes_check
(
$APPS
{
$app
},
@IMPRESSDOCS
);
}
if
(
$app
eq
"base"
)
{
print_suffixes_check
(
$APPS
{
$app
},
@BASEDOCS
);
}
if
(
$app
eq
"calc"
)
{
print_suffixes_check
(
$APPS
{
$app
},
@CALCDOCS
);
}
if
(
$app
eq
"master"
)
{
print_suffixes_check
(
$APPS
{
$app
},
@MASTERDOCS
);
}
if
(
$app
eq
"template"
)
{
print_suffixes_check
(
$APPS
{
$app
},
@TEMPLATES
);
}
# libreoffice should contain all...
if
((
$app
eq
"office"
)
||
(
$app
eq
"office_short"
))
{
print_suffixes_check
(
$APPS
{
$app
},
@DRAWDOCS
,
@WRITERDOCS
,
@MATHDOCS
,
@IMPRESSDOCS
,
@BASEDOCS
,
@CALCDOCS
,
@MASTERDOCS
,
@TEMPLATES
,
@WEBDOCS
);
}
# unopkg is a standalone tool
if
(
$app
eq
"unopkg"
)
{
print_suffixes_check
(
$APPS
{
$app
},
@EXTENSIONS
);
}
if
(
$app
eq
"unopkg"
)
{
print_suffixes_check
(
$APPS
{
$app
},
@EXTENSIONS
);
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment