Re: bash-completion pros/cons (was: Re: Need commands)
Hi, 18 juin 2020 à 09:00 de david...@freevolt.org: > On Tue, 16 Jun 2020, l0f...@tuta.io wrote: > >> 16 juin 2020 à 10:47 de david...@freevolt.org: >> >>> I hear some people find bash-completion helpful. Personally, though, >>> no. Do not want. >>> >> Interesting/intriguing point of view. >> > I will remember this polite new way to call somebody a weirdo. > Don't get me wrong, I just meant that your previous answer aroused my curiosity. So I wanted to look deeper into it because maybe *I* was the weirdo after all ;p Thanks & Best regards, l0f4r0
Re: bash-completion pros/cons (was: Re: Need commands)
On Thu, Jun 18, 2020 at 07:25:40AM +, davidson wrote: > On Tue, 16 Jun 2020, l0f...@tuta.io wrote: [...] > >Maybe sometimes completion is not working as it should, nothing is > >perfect, but globally I think that it saves time more than its > >wastes. > > For those it suits, I am glad the package is available. Absolutely. Don't get me wrong. I decided it's not /for me/. I'm still glad it exists and I'm happy it's free. Cheers -- t signature.asc Description: Digital signature
Re: bash-completion pros/cons (was: Re: Need commands)
On Tue, 16 Jun 2020, l0f...@tuta.io wrote: [dd] 16 juin 2020 à 13:23 de wool...@eeg.ccf.org It's flaky and full of errors. (Many of these errors end up on the bash mailing lists as bug reports in bash, but nope, they're from bash-completion.) It bloats bash, using a lot of memory, and taking extra CPU and wall-clock time (may not be noticeable on modern hardware). That said, many people still find its benefits outweight its problems, and are quite happy with it. You get to make your own choice. Thanks. Proofreading the final command is not forbidden, right? ^^ That is always a good idea. And I prefer the mistakes that I find, the ones I correct, and the ones I overlook, to be my own. Because I learn best from my own mistakes. Maybe sometimes completion is not working as it should, nothing is perfect, but globally I think that it saves time more than its wastes. For those it suits, I am glad the package is available. It's probably more a conceptual/philosophical approach here ;) Agreed. -- https://news.ycombinator.com/item?id=12518471 alexk already addressed your concern: your keys, preferably issued by your org's CA (instead of being generated by you) should be short-lived, oftentimes for the duration of your "work shift". The tools listed above support this.
Re: bash-completion pros/cons (was: Re: Need commands)
On Tue, 16 Jun 2020, l0f...@tuta.io wrote: 16 juin 2020 à 10:47 de david...@freevolt.org: I hear some people find bash-completion helpful. Personally, though, no. Do not want. Interesting/intriguing point of view. I will remember this polite new way to call somebody a weirdo. Why would someone not be interested in autocompletion please? I am perfectly happy with autocompletion in general. Disabling bash-completion package does not mean one must peck out their bash command lines verbatim, character-by-character, as one must in grub rescue shell. Others have also pointed this out. I use a lot of the autocompletion (and command history) functionality described in bash(1), under the sections * READLINE:Completing * READLINE:Commands for Manipulating the History * HISTORY EXPANSION Those functions are agnostic: No matter what particular fragmentary command presently awaits completion (manual or otherwise), their behavior does not vary. And their very agnosticism is significant; it is largely why learning the shape of their behavior, and how to take advantage of it, has been worth the time and effort. Now consider the following: bash(1), section READLINE:Programmable Completion (AKA progcomp) [...] By default, if a compspec is found, whatever it generates is returned to the completion code as the full set of possible completions. The default bash completions are not attempted, and the readline default of filename completion is disabled. If the -o bashdefault option was supplied to complete when the compspec was defined, the bash default completions are attempted if the compspec generates no matches. If the -o default option was supplied to complete when the compspec was defined, readline's default completion will be performed if the compspec (and, if attempted, the default bash completions) generate no matches. [...] In other words, with progcomp I can (and the bash-completion package does) lay booby-traps that will override the behavior I've become so accustomed to. I might, in specialised context, choose to do this. But when any exceptional behavior has been specified by myself, then I know who to blame for the surprises. (And my own mistakes teach me things much more reliably than the mistakes of others.) In the shell I'm trying to play a nice orderly game of croquet. If there are going to be mines under the lawn, I want to install them myself, carefully. When I want someone to surprise me there is always NetHack. -- \ ' ., o O / It looks like you're writing a letter! ) / Would you like some help?/ Y : \.__./
Re: bash-completion pros/cons (was: Re: Need commands)
On Tue, Jun 16, 2020 at 01:53:59PM +0200, l0f...@tuta.io wrote: [...] > Maybe sometimes completion is not working as it should, nothing is perfect, > but globally I think that it saves time more than its wastes. Then just use it and be happy. And just accept that some (me, among others) are happier without :-) Yes, I've tried it. Yes, I think it's technically nifty. But no, it doesn't mesh well with the way I work. Even if it were bug-free, it wouldn't be "my" thing. I live by the command line, and there are roughly two classes of things I do: those I do very often, where history search is just unbeatable, and those I do rarely. For those I have a man page open, sometimes a notebook (in Emacs, but I disgress) to take notes and I proceed slowly. The top of the first class are candidates for automation and scripting. In the first class, I don't need autocompletion, since I know what I'm doing (heck, my muscle memory nearly knows. In the second class, autocompletion is a train wreck waiting to happen: I really *want* to know why each piece is there. The only really useful autocompletion is actually file path autocompletion, and I have that without any extra packages. > It's probably more a conceptual/philosophical approach here ;) For me it isn't. It is an eminently practical issue. Cheers -- t signature.asc Description: Digital signature
Re: bash-completion pros/cons (was: Re: Need commands)
Hi Greg, 16 juin 2020 à 13:23 de wool...@eeg.ccf.org > It's flaky and full of errors. (Many of these errors end up on the > bash mailing lists as bug reports in bash, but nope, they're from > bash-completion.) It bloats bash, using a lot of memory, and taking > extra CPU and wall-clock time (may not be noticeable on modern hardware). > > That said, many people still find its benefits outweight its problems, > and are quite happy with it. You get to make your own choice. > Thanks. Proofreading the final command is not forbidden, right? ^^ Maybe sometimes completion is not working as it should, nothing is perfect, but globally I think that it saves time more than its wastes. It's probably more a conceptual/philosophical approach here ;) Best regards, l0f4r0
Re: bash-completion pros/cons (was: Re: Need commands)
On Tue, Jun 16, 2020 at 12:54:58PM +0200, l0f...@tuta.io wrote: > Hi, > > 16 juin 2020 à 10:47 de david...@freevolt.org: > > > I hear some people find bash-completion helpful. Personally, though, > > no. Do not want. > > > Interesting/intriguing point of view. > Why would someone not be interested in autocompletion please? It's flaky and full of errors. (Many of these errors end up on the bash mailing lists as bug reports in bash, but nope, they're from bash-completion.) It bloats bash, using a lot of memory, and taking extra CPU and wall-clock time (may not be noticeable on modern hardware). That said, many people still find its benefits outweight its problems, and are quite happy with it. You get to make your own choice.
Re: Need commands
On 2020-06-16 09:47, davidson wrote: many thanks mick -- Key ID4BFEBB31
bash-completion pros/cons (was: Re: Need commands)
Hi, 16 juin 2020 à 10:47 de david...@freevolt.org: > I hear some people find bash-completion helpful. Personally, though, > no. Do not want. > Interesting/intriguing point of view. Why would someone not be interested in autocompletion please? Best regards, l0f4r0
Re: Need commands
On Sun, 14 Jun 2020, mick crane wrote: On 2020-06-14 12:42, to...@tuxteam.de wrote: On Sun, Jun 14, 2020 at 12:23:15PM +0100, mick crane wrote: On 2020-06-13 19:51, Darac Marjal wrote: ... >The full list of commands depends on what's installed, but you can >retrieve that list by opening a terminal and typing: > > compgen -ac what are these words that begin with the underscore ? __load_completion __ltrim_colon_completions __parse_options __reassemble_comp_words_by_ref _allowed_groups _allowed_users _available_interfaces _cd _cd_devices _command I don't have those. Most probably they are shell functions defined for your session. Just issue the command type __load_completion to shed light on that. Which package or program defines them is anyone's guess, but you can try to look into your shell initialization files (i.e. /etc/profile, ~/.bashrc, all those mentioned in the FILES section of man bash [1]) to learn more. Cheers [1] or whatever shell is yours. -- tomás I wish I'd never looked now. so they are functions defined in the actual bash code for other words to get the result of ? Er, they look like shell functions that bash_completion (from package "bash-completion") defines for the greater glory of Bash Completionstan. $ apt-description bash-completion # Not a real command bash-completion - programmable completion for the bash shell bash completion extends bash's standard completion behavior to achieve complex command lines with just a few keystrokes. This project was conceived to produce programmable completion routines for the most common Linux/UNIX commands, reducing the amount of typing sysadmins and programmers need to do on a daily basis. Homepage: https://github.com/scop/bash-completion You can read about shell functions in general in the bash man page, either briefly under section "SHELL GRAMMAR" in subsection "Shell Function Definitions", or at greater length in the section "FUNCTIONS". I hear some people find bash-completion helpful. Personally, though, no. Do not want. So, when using a system with bash-completion installed, I disable it in my own accounts with two steps: STEP 1 Create a file ~/.config/bash_completion containing the line "shopt -u progcomp". (If you happen not to have a directory ~/.config already, create one first.) $ echo "# Disable bash-completion" >> ~/.config/bash_completion $ echo "shopt -u progcomp" >> ~/.config/bash_completion This makes /etc/profile.d/bash_completion.sh do nothing when it runs (other than source your ~/.config/bash_completion), because /etc/profile.d/bash_completion.sh is polite like that. In order for this to be effective, the file you create in ~/.config must have that precise name (with an underscore, not a hyphen), and it must unset the progcomp shell option (which is what the line "shopt -u progcomp" does). /usr/share/doc/bash-completion/README.md.gz explains STEP 1 more generally like so: The `profile.d` script provides a configuration file hook that can be used to prevent loading `bash_completion` on per user basis when it's installed system wide. To do this: 1. Turn off programmable completion with `shopt -u progcomp` in `$XDG_CONFIG_HOME/bash_completion` (or `~/.config/bash_completion` if `$XDG_CONFIG_HOME` is not set) 2. Turn it back on (for example in `~/.bashrc`) if you want to use programmable completion for other purposes. STEP 2 Examine ~/.bashrc and look for any sections that enable bash_completion, and comment them out: # enable programmable completion features (you don't need to enable # this, if it's already enabled in /etc/bash.bashrc and /etc/profile # sources /etc/bash.bashrc). # if [ -f /etc/bash_completion ] && ! shopt -oq posix; then #. /etc/bash_completion Both steps are required. The first keeps system-wide profile from running bash_completion for you. The second keeps your ~/.bashrc from running it for yourself. After doing both, start a new bash session and check to see if $ typeset -F still shows presence of the offending functions. -- https://news.ycombinator.com/item?id=12518471 alexk already addressed your concern: your keys, preferably issued by your org's CA (instead of being generated by you) should be short-lived, oftentimes for the duration of your "work shift". The tools listed above support this.
Re: Need commands
On Mon, Jun 15, 2020 at 08:03:05AM -0400, Greg Wooledge wrote: > On Sun, Jun 14, 2020 at 03:48:19PM +0200, to...@tuxteam.de wrote: > > OK. My hunch [...] > Bear in mind that the OP was running Kali, not Debian. I don't know off > hand whether Kali makes changes to their bash-completion package, but > in any event, it's something to keep in mind when responding. Thanks for the heads-up, I wasn't aware (rough sleep schedule, currently :-/ In any case, my aim was to provide a fishing rod along with the fish ;-) Cheers -- t signature.asc Description: Digital signature
Re: Need commands
On Sun, Jun 14, 2020 at 03:48:19PM +0200, to...@tuxteam.de wrote: > OK. My hunch is that they have something to do with bash autocompletion. > Since they are functions, not files, it's hard to say which package > they come from (with on-board means, that is). > > But there are way more powerful off-board means. Enter Debian Code Search: > > https://codesearch.debian.net/ Bear in mind that the OP was running Kali, not Debian. I don't know off hand whether Kali makes changes to their bash-completion package, but in any event, it's something to keep in mind when responding.
Re: Need commands
On Sat 13 Jun 2020 at 21:23:51 (-0600), Charles Curley wrote: > -- > Does anybody read signatures any more? On Sat 13 Jun 2020 at 22:36:15 (-0700), Mike McClain wrote: > > -- > Always remember: > It is a mathematical certainty that half the people > in this country are below average in intelligence! If that's meant to be a signature, you should put one space after the -- like the example above. s/average/median/ is the mathematical certainty. It's a well-known fact that most people have an above-average number of legs. Cheers, David.
Re: Need commands
On Sun, Jun 14, 2020 at 01:38:29PM +0100, mick crane wrote: [...] > I wish I'd never looked now. Why? Granted, curiosity kills the cat, they say. But that's what we hackers and tinkerers thrive on, ain't it? What's a life without learning? > so they are functions defined in the actual bash code for other > words to get the result of ? OK. My hunch is that they have something to do with bash autocompletion. Since they are functions, not files, it's hard to say which package they come from (with on-board means, that is). But there are way more powerful off-board means. Enter Debian Code Search: https://codesearch.debian.net/ Put __load_completion into that little box and... yes, it comes from the package "bash-completion" (which I explicitly don't install: I tried it once and didn't like it. Too much magic. But horses for courses, as they say, too :) Enjoy -- tomás signature.asc Description: Digital signature
Re: Need commands
On 2020-06-14 12:42, to...@tuxteam.de wrote: On Sun, Jun 14, 2020 at 12:23:15PM +0100, mick crane wrote: On 2020-06-13 19:51, Darac Marjal wrote: ... >The full list of commands depends on what's installed, but you can >retrieve that list by opening a terminal and typing: > > compgen -ac what are these words that begin with the underscore ? __load_completion __ltrim_colon_completions __parse_options __reassemble_comp_words_by_ref _allowed_groups _allowed_users _available_interfaces _cd _cd_devices _command I don't have those. Most probably they are shell functions defined for your session. Just issue the command type __load_completion to shed light on that. Which package or program defines them is anyone's guess, but you can try to look into your shell initialization files (i.e. /etc/profile, ~/.bashrc, all those mentioned in the FILES section of man bash [1]) to learn more. Cheers [1] or whatever shell is yours. -- tomás I wish I'd never looked now. so they are functions defined in the actual bash code for other words to get the result of ? mick -- Key ID4BFEBB31
Re: Need commands
On 2020-06-14 12:42, to...@tuxteam.de wrote: On Sun, Jun 14, 2020 at 12:23:15PM +0100, mick crane wrote: On 2020-06-13 19:51, Darac Marjal wrote: ... >The full list of commands depends on what's installed, but you can >retrieve that list by opening a terminal and typing: > > compgen -ac what are these words that begin with the underscore ? __load_completion __ltrim_colon_completions __parse_options __reassemble_comp_words_by_ref _allowed_groups _allowed_users _available_interfaces _cd _cd_devices _command I don't have those. Most probably they are shell functions defined for your session. Just issue the command type __load_completion to shed light on that. Which package or program defines them is anyone's guess, but you can try to look into your shell initialization files (i.e. /etc/profile, ~/.bashrc, all those mentioned in the FILES section of man bash [1]) to learn more. Cheers [1] or whatever shell is yours. -- tomás probably then is to do with sshing in to see what this "compgen" was. mick -- Key ID4BFEBB31
Re: Need commands
On Sun, Jun 14, 2020 at 12:23:15PM +0100, mick crane wrote: > On 2020-06-13 19:51, Darac Marjal wrote: > ... > >The full list of commands depends on what's installed, but you can > >retrieve that list by opening a terminal and typing: > > > > compgen -ac > > what are these words that begin with the underscore ? > > __load_completion > __ltrim_colon_completions > __parse_options > __reassemble_comp_words_by_ref > _allowed_groups > _allowed_users > _available_interfaces > _cd > _cd_devices > _command I don't have those. Most probably they are shell functions defined for your session. Just issue the command type __load_completion to shed light on that. Which package or program defines them is anyone's guess, but you can try to look into your shell initialization files (i.e. /etc/profile, ~/.bashrc, all those mentioned in the FILES section of man bash [1]) to learn more. Cheers [1] or whatever shell is yours. -- tomás signature.asc Description: Digital signature
Re: Need commands
On 2020-06-13 19:51, Darac Marjal wrote: ... The full list of commands depends on what's installed, but you can retrieve that list by opening a terminal and typing: compgen -ac what are these words that begin with the underscore ? __load_completion __ltrim_colon_completions __parse_options __reassemble_comp_words_by_ref _allowed_groups _allowed_users _available_interfaces _cd _cd_devices _command mick -- Key ID4BFEBB31
Re: Need commands
On Sat, Jun 13, 2020 at 02:01:06PM +0300, Teemu Likonen wrote: > ROHIT SONI [2020-06-13T10:12:06+05:30] wrote: > > > I need full commands for 2020.2 gnu/linux rolling kali tty1 > > List all commands in a terminal program and Bash shell: > > ls -l {/usr,}/{s,}bin/; help > > -- > /// Teemu Likonen - .-.. http://www.iki.fi/tlikonen/ > // OpenPGP: 4E1055DC84E9DFF613D78557719D69D324539450 Way to go, Mr. Likonen. Thumbs up. Mike -- Always remember: It is a mathematical certainty that half the people in this country are below average in intelligence!
Re: Need commands
On 13/06/2020 05:42, ROHIT SONI wrote: > Hello sir To whom are you addressing this message? Which particular "sir"? Would one of the https://www.debian.org/women/ not be suitable? > I need full commands for 2020.2 gnu/linux rolling kali tty1 The full list of commands depends on what's installed, but you can retrieve that list by opening a terminal and typing: compgen -ac Enjoy! signature.asc Description: OpenPGP digital signature
Re: Need commands
ROHIT SONI [2020-06-13T10:12:06+05:30] wrote: > I need full commands for 2020.2 gnu/linux rolling kali tty1 List all commands in a terminal program and Bash shell: ls -l {/usr,}/{s,}bin/; help -- /// Teemu Likonen - .-.. http://www.iki.fi/tlikonen/ // OpenPGP: 4E1055DC84E9DFF613D78557719D69D324539450 signature.asc Description: PGP signature
Re: Need commands
On 06/12/2020 11:42 PM, ROHIT SONI wrote: Hello sir I need full commands for 2020.2 gnu/linux rolling kali tty1 Though Kali is derived from Debian, it is *NOT* Debian. [q.v. https://en.wikipedia.org/wiki/Kali_Linux ]
Re: Need commands
ROHIT SONI wrote: > I need full commands for 2020.2 gnu/linux rolling kali tty1 I need 100,- €
Need commands
Hello sir I need full commands for 2020.2 gnu/linux rolling kali tty1