Re: [CentOS] Bash completion thrown by quoted option args?
On May 24, 2019, at 10:48, wwp wrote: > >> On Fri, 24 May 2019 10:28:54 -0400 Jonathan Billings >> wrote: >> >>> On May 24, 2019, at 09:33, isdtor wrote: >>> >>> [root@localhost ~]# rpm -ql bash-completion |grep yum >>> [root@localhost ~]# >> >> The yum bash completion configuration is in the ‘yum’ package. > > It's yum-utils, isn't it? The ‘yum-utils’ package does have completions for the tools it packages, such as repoquery, but the ‘yum’ package itself has its completion configuration. At least on CentOS 7. Oddly enough, yum-utils puts files in /etc/bash_completion.d rather than in /usr/share/bash-completion/completions/. Overrides? — Jonathan Billings ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Bash completion thrown by quoted option args?
Hello Jonathan, On Fri, 24 May 2019 10:28:54 -0400 Jonathan Billings wrote: > On May 24, 2019, at 09:33, isdtor wrote: > > > > [root@localhost ~]# rpm -ql bash-completion |grep yum > > [root@localhost ~]# > > The yum bash completion configuration is in the ‘yum’ package. It's yum-utils, isn't it? Regards, -- wwp pgpl7LG3Bpxb5.pgp Description: OpenPGP digital signature ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Bash completion thrown by quoted option args?
On May 24, 2019, at 09:33, isdtor wrote: > > [root@localhost ~]# rpm -ql bash-completion |grep yum > [root@localhost ~]# The yum bash completion configuration is in the ‘yum’ package. -- Jonathan Billings ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Bash completion thrown by quoted option args?
Hello isdtor, On Fri, 24 May 2019 14:33:29 +0100 isdtor wrote: > wwp writes: > > Hello isdtor, > > > > > > On Fri, 24 May 2019 09:33:55 +0100 isdtor wrote: > > > > > Leroy Tennison writes: > > > > I am going to take a really wild guess and say "Try replacing the > > > > outermost quotes with single quotes or escape the double quotes around > > > > the numeral 1". Your second example has double quotes within double > > > > quotes and I'm wondering if that's getting rendered as "yum > > > > --debuglevel=" 1 " install ..." (extra space added for > > > > emphasis). > > > > > > The outermost quotes are not part of the command, they were only a means > > > to set off the command typed from the surrounding text. > > > > > > Single quotes around the option arg don't work either. > > > > In that specific example (--debuglevel="1"), you don't need the quotes. > > But, if that's just an example and you really use command-line > > arguments that need to be quoted, for instance because they contain > > spaces, maybe you could just use \ to protect spaces like: > > # command "a b" c > > would become: > > # command a\ b c (2 params) > > which is different from: > > # command a b c (3 params) > > just escaping the space to prevent bash from considering "a\ b" as two > > words). > > > > Also, maybe it's bash completion for yum that is your problem, did you > > try disabling yum-specific completion? That would let you still the > > ability to use path completion. > > In my case, the argument being quoted (different option) is a "*". Your > method of escaping instead of quoting works. Glad that it works! Escaping is often an alternate method to quoting, makes things less readable but saves you in some conditions. > I couldn't find anything yum-specific in bash-completion. > > [root@localhost ~]# rpm -ql bash-completion |grep yum > [root@localhost ~]# Bash allows modular completion, this is why is may suggest command-line arguments (switches) to `yum` or other commands, see: # yum up update upgrade It proposes update and upgrades, because bash completion has been told how yum works. Unfortunately I don't have any pointers that would document all this properly, but to say that it's all in /etc/bash_completion.d and: # rpm -qf /etc/bash_completion.d/yum-utils.bash yum-utils-1.1.31-50.el7.noarch and # rpm -qa|grep bash-completion bash-completion-extras-2.1-11.el7.noarch bash-completion-2.1-6.el7.noarch Here I disabled app-specific completion in my ~/.bash_profile 'cause it might slow down user interaction and sometimes simply cause issues. To get the expanding of paths only (as in bash 2 at least, IIRC): # complete -D -o default See `man bash` and look for the `complete` command to know more. Regards, -- wwp pgp2Lxb91gtqo.pgp Description: OpenPGP digital signature ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Bash completion thrown by quoted option args?
isdtor wrote: > wwp writes: >> On Fri, 24 May 2019 09:33:55 +0100 isdtor wrote: >>> Leroy Tennison writes: >>> I am going to take a really wild guess and say "Try replacing the outermost quotes with single quotes or escape the double quotes around the numeral 1". Your second example has double quotes within double quotes and I'm wondering if that's getting rendered as "yum --debuglevel=" 1 " install ..." (extra space added for emphasis). >>> >>> The outermost quotes are not part of the command, they were only a >>> means to set off the command typed from the surrounding text. >>> >>> Single quotes around the option arg don't work either. >>> >> >> In that specific example (--debuglevel="1"), you don't need the quotes. >> But, if that's just an example and you really use command-line >> arguments that need to be quoted, for instance because they contain >> spaces, maybe you could just use \ to protect spaces like: # command "a >> b" c would become: # command a\ b c (2 params) >> which is different from: # command a b c (3 params) >> just escaping the space to prevent bash from considering "a\ b" as two >> words). >> >> Also, maybe it's bash completion for yum that is your problem, did you >> try disabling yum-specific completion? That would let you still the >> ability to use path completion. > > In my case, the argument being quoted (different option) is a "*". Your > method of escaping instead of quoting works. > > I couldn't find anything yum-specific in bash-completion. > > > [root@localhost ~]# rpm -ql bash-completion |grep yum > [root@localhost ~]# > I really haven't been following this thread, but if it's about yum, it's always been perfectly happy with $ yum update package\* with no quotes at all. mark ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Bash completion thrown by quoted option args?
wwp writes: > Hello isdtor, > > > On Fri, 24 May 2019 09:33:55 +0100 isdtor wrote: > > > Leroy Tennison writes: > > > I am going to take a really wild guess and say "Try replacing the > > > outermost quotes with single quotes or escape the double quotes around > > > the numeral 1". Your second example has double quotes within double > > > quotes and I'm wondering if that's getting rendered as "yum > > > --debuglevel=" 1 " install ..." (extra space added for > > > emphasis). > > > > The outermost quotes are not part of the command, they were only a means to > > set off the command typed from the surrounding text. > > > > Single quotes around the option arg don't work either. > > In that specific example (--debuglevel="1"), you don't need the quotes. > But, if that's just an example and you really use command-line > arguments that need to be quoted, for instance because they contain > spaces, maybe you could just use \ to protect spaces like: > # command "a b" c > would become: > # command a\ b c (2 params) > which is different from: > # command a b c (3 params) > just escaping the space to prevent bash from considering "a\ b" as two > words). > > Also, maybe it's bash completion for yum that is your problem, did you > try disabling yum-specific completion? That would let you still the > ability to use path completion. In my case, the argument being quoted (different option) is a "*". Your method of escaping instead of quoting works. I couldn't find anything yum-specific in bash-completion. [root@localhost ~]# rpm -ql bash-completion |grep yum [root@localhost ~]# ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Bash completion thrown by quoted option args?
Hello isdtor, On Fri, 24 May 2019 09:33:55 +0100 isdtor wrote: > Leroy Tennison writes: > > I am going to take a really wild guess and say "Try replacing the outermost > > quotes with single quotes or escape the double quotes around the numeral > > 1". Your second example has double quotes within double quotes and I'm > > wondering if that's getting rendered as "yum --debuglevel=" 1 " > > install ..." (extra space added for emphasis). > > The outermost quotes are not part of the command, they were only a means to > set off the command typed from the surrounding text. > > Single quotes around the option arg don't work either. In that specific example (--debuglevel="1"), you don't need the quotes. But, if that's just an example and you really use command-line arguments that need to be quoted, for instance because they contain spaces, maybe you could just use \ to protect spaces like: # command "a b" c would become: # command a\ b c (2 params) which is different from: # command a b c (3 params) just escaping the space to prevent bash from considering "a\ b" as two words). Also, maybe it's bash completion for yum that is your problem, did you try disabling yum-specific completion? That would let you still the ability to use path completion. Regards, -- wwp pgpVLkdoIsFDA.pgp Description: OpenPGP digital signature ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] system unresponsive
You should be able to recognize or monitor this by configure the syslog to print everything on a specific TTY or use the remote logging functionality. Kind regards Thomas Am Do., 23. Mai 2019 um 18:31 Uhr schrieb Jon Pruente < jprue...@riskanalytics.com>: > On Wed, May 22, 2019 at 10:02 AM mark wrote: > > > That seems unlikely. Foe one, I've seen that... but I *always* see > entries > > in the log about the oom-killer being invoked. For another, this isn't a > > compute node, it's *only* a fileserver, serving projects, home > > directories, and backups (home-grown b/u, uses rsync), and backups don't > > start until well after midnight, and as we're business-hours only, there > > was less usage, and it does have 256G RAM > > > > I have two servers that would lock up like this occasionally, and if I let > them sit at the console long enough sometimes they would give a login > prompt. It took a lot of time and frustration (these are prod servers) but > I tracked it down to a problem in the XFS driver, as it never occurred on > the systems with EXT4 filesystems. The XFS driver would hang, preventing > writes to the filesystem. I could identify exactly when that happened as > all system logging would suddenly stop at the same second. Then OOMKiller > would come in and start killing off processes but that wouldn't be in the > logs on disk because the file system couldn't write. I rolled the servers > back to a 5xx series kernel and the issue didn't resurface. I recently let > them boot the newer 9xx series kernels and I'm hoping the XFS issue is > fixed. > ___ > CentOS mailing list > CentOS@centos.org > https://lists.centos.org/mailman/listinfo/centos > -- Linux ... enjoy the ride! ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Bash completion thrown by quoted option args?
Leroy Tennison writes: > I am going to take a really wild guess and say "Try replacing the outermost > quotes with single quotes or escape the double quotes around the numeral 1". > Your second example has double quotes within double quotes and I'm wondering > if that's getting rendered as "yum --debuglevel=" 1 " install ..." > (extra space added for emphasis). The outermost quotes are not part of the command, they were only a means to set off the command typed from the surrounding text. Single quotes around the option arg don't work either. ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos