Bug 33733 - Добавить bash completion для samba-tool
Summary: Добавить bash completion для samba-tool
Status: NEW
Alias: None
Product: Sisyphus
Classification: Development
Component: samba-DC (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Evgeny Sinelnikov
QA Contact: qa-sisyphus
URL: https://gist.github.com/ls42/0dca1787...
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-04 23:37 MSK by Vitaly Lipatov
Modified: 2017-12-21 16:44 MSK (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaly Lipatov 2017-08-04 23:37:08 MSK
Не хватает bash completion для samba-tool.
Нашёл реализацию, например, здесь:
https://gist.github.com/ls42/0dca178759e42c04e685
Comment 1 Evgeny Sinelnikov 2017-12-21 15:29:39 MSK
Этот вариант не выглядит функциональным. Может я неправлиьно устаналиваю? Я скопировал пример samba-tool_completion.bash в файл /usr/share/bash-completion/completions/samba-tool

[vagrant@server ~]$ samba-tool dns 
aclcheck                    .config/                    drs                         info                        .mutt/                      replicate                   setpassword                 update
add                         create                      dsacl                       join                        ntacl                       rodc                        show                        user
addmembers                  dbcheck                     enable                      kcc                         options                     roothints                   showrepl                    vampire
.apt_history                dcpromo                     exportkeytab                ldapcmp                     password                    .rpmmacros                  sites                       .xprofile
assicupgrade                del                         fetch                       level                       passwordsettings            samba-tool_completion.bash  spn                         .xsession.d/
.bash_history               delete                      fsmo                        list                        preload                     seize                       .ssh/                       zonecreate
.bash_logout                dellink                     get                         listall                     processes                   serverinfo                  sysvolcheck                 zonedelete
.bash_profile               demote                      getinheritance              listcontainers              provision                   set                         sysvolreset                 zoneinfo
.bashrc                     disable                     getlink                     listmembers                 query                       setexpiry                   testparm                    zonelist
bind                        dns                         gpo                         .local/                     remove                      setinheritance              time                        
.cache/                     domain                      group                       .lpoptions                  removemembers               setlink                     transfer                    

[vagrant@server ~]$ samba-tool spn 
aclcheck                    .config/                    drs                         info                        .mutt/                      replicate                   setpassword                 update
add                         create                      dsacl                       join                        ntacl                       rodc                        show                        user
addmembers                  dbcheck                     enable                      kcc                         options                     roothints                   showrepl                    vampire
.apt_history                dcpromo                     exportkeytab                ldapcmp                     password                    .rpmmacros                  sites                       .xprofile
assicupgrade                del                         fetch                       level                       passwordsettings            samba-tool_completion.bash  spn                         .xsession.d/
.bash_history               delete                      fsmo                        list                        preload                     seize                       .ssh/                       zonecreate
.bash_logout                dellink                     get                         listall                     processes                   serverinfo                  sysvolcheck                 zonedelete
.bash_profile               demote                      getinheritance              listcontainers              provision                   set                         sysvolreset                 zoneinfo
.bashrc                     disable                     getlink                     listmembers                 query                       setexpiry                   testparm                    zonelist
bind                        dns                         gpo                         .local/                     remove                      setinheritance              time                        
.cache/                     domain                      group                       .lpoptions                  removemembers               setlink                     transfer                    
[vagrant@server ~]$ samba-tool 
aclcheck                    .config/                    drs                         info                        .mutt/                      replicate                   setpassword                 update
add                         create                      dsacl                       join                        ntacl                       rodc                        show                        user
addmembers                  dbcheck                     enable                      kcc                         options                     roothints                   showrepl                    vampire
.apt_history                dcpromo                     exportkeytab                ldapcmp                     password                    .rpmmacros                  sites                       .xprofile
assicupgrade                del                         fetch                       level                       passwordsettings            samba-tool_completion.bash  spn                         .xsession.d/
.bash_history               delete                      fsmo                        list                        preload                     seize                       .ssh/                       zonecreate
.bash_logout                dellink                     get                         listall                     processes                   serverinfo                  sysvolcheck                 zonedelete
.bash_profile               demote                      getinheritance              listcontainers              provision                   set                         sysvolreset                 zoneinfo
.bashrc                     disable                     getlink                     listmembers                 query                       setexpiry                   testparm                    zonelist
bind                        dns                         gpo                         .local/                     remove                      setinheritance              time                        
.cache/                     domain                      group                       .lpoptions                  removemembers               setlink                     transfer
Comment 2 Vitaly Lipatov 2017-12-21 15:38:32 MSK
> Этот вариант не выглядит функциональным.
Почему, он функционален, aclcheck и прочее выдаёт. Просто в нём ещё и бага, он добавляет файлы из текущего каталога в выдачу.
Comment 3 Vitaly Lipatov 2017-12-21 15:48:47 MSK
Видимо, причина в опечатке:
$deletation\
вместо delegation

И лучше устанавливать в
/etc/bash_completion.d/samba-tool
Comment 4 Evgeny Sinelnikov 2017-12-21 16:44:30 MSK
Исправление delegation сохраняет мусор в выводе, хотя сам delegation теперь отрабатывает.