OK, please on
$ help complete
at "-r" please mention
"To instead toggle on and off PROGRAMMABLE completion, use shopt -[su]
progcomp."
Reason: there is very little chance the user could Google the right
answer out of the forest of answers out there.
(P.S., I am not sure if PROGRAMMABLE should be
$ help shopt
shopt: shopt [-pqsu] [-o] [optname ...]
Set and unset shell options.
Change the setting of each shell option OPTNAME. Without any option
arguments, list all shell options with an indication of whether or not each
is set.
Add:
If just optnames are given, list
OK it mentions "Without any option arguments". Then it also needs to
mention "Without any argument at all".
> "EB" == Eduardo Bustamante writes:
EB> I googled "disable programmable completion bash" and the first result
I was just googling for disable bash completion.
That's how confusing it is for most users.
$PS4 is for sh -x. Well, $PS5 or $PSv should be for sh -v!
Imagine, with just a simple PS5='$ ', one could produce
perfect dialogues,
$ set -eu /tmp/x
$ mkdir $@
$ cd $@
$ seq 3|xargs touch
$ ls -U $@
3 2 1
$ mv -v $@ /var$@
created directory '/var/tmp/x'
copied '/tmp/x/1' -> '/var/tmp/x/1'
cop
OK so bash is right and dash is wrong? So I should file a dash bug?
On the bash man page at
expr1 -a expr2
True if both expr1 and expr2 are true.
expr1 -o expr2
True if either expr1 or expr2 is true.
and on "help test" perhaps add the same warning as one sees on
(info "(coreutils) Connectives for
All I know is in emacs,
let's say we did
^Rgrandma this morning,
and in the afternoon we did
^Rgrandpa.
Well we could do ^R^R to search for grandpa again, and for grandma we
could employ ^R then
> M-p (translated from p) runs the command
> previous-history-element (found in minibuffer-local-isear
On the man page:
Readline Variables
Readline has variables that can be used to further customize its
behavior. A variable may be set in the inputrc file with a
ADD: ^or inspected with the bind command, or
set
statement of the for
$ ls *.pdf
a.pdf b.pdf
$ diff *.p
At this point should complete "*.pdf".
Or maybe as a bonus it could complete "a.pdf b.pdf" via a different key.
>>>>> "CR" == Chet Ramey writes:
CR> On 9/1/19 11:10 AM, 積丹尼 Dan Jacobson wrote:
>> $ ls *.pdf
>> a.pdf b.pdf
>> $ diff *.p
>>
>> At this point should complete "*.pdf".
CR> It does (well, the default completion does, may
CR> I'm saying that's what the default bash completion code does. The default
CR> bash completion code leaves the word unchanged.
Yes. That's why I'm saying wouldn't it be neat if it made
*.p into *.pdf? What harm could possibly happen?
The idea being if the user has handed it an asterisk,
then he
$ mapping/taipower/pole2tm
bash: mapping/taipower/pole2tm: No such file or directory
Must be a bash bug! Proof:
$ ls -l mapping/taipower/pole2tm
-rwxr-xr-x 1 jidanni jidanni 11290 2012-06-19 mapping/taipower/pole2tm
But wait,
$ strace mapping/taipower/pole2tm
execve("mapping/taipower/pole2tm", [
Man bash: "unset"
if there is no variable by that name, any function with that name is unset.
Add:
If there is no function by that name, nothing happens for that name.
PROMPT_COMMAND=sleep\ 1 is great, it lets us slow down scripts...
but alas only if they are interactive.
One might say: "Sure, instead of
$ bash script
just use
$ sed 's/^/sleep 1; /' script | bash"
But that assumes one command per line, and could easily mangle things.
Instead bash simply needs
> "AKK" == Andreas Kusalananda Kähäri writes:
AKK> Does setting a DEBUG trap not do what you want? Such a trap would be
AKK> executed before each simple command...
OK! I guess it does! Thanks.
$ ls $HOME/xx/yy/z
becomes
$ ls \$HOME/xx/yy/zz
It should become
$ ls $HOME/xx/yy/zz
else it will fail when the user finally hits RET.
(Assume a zz file already exists. "ls" here is just an example. same for
"cat" etc.) Bash 5.0.16
OK, filed https://github.com/scop/bash-completion/issues/417 .
Instead of
$ zz /jidanni_backups/da
Display all 113 possibilities? (y or n) n
and then finally showing
$ zz /jidanni_backups/dan_home_bkp
how about doing the expansion first, so entering
$ zz /jidanni_backups/da would then change into
$ zz /jidanni_backups/dan_home_bkp with below it the questio
$ man bash
page-completions (On)
If set to On, readline uses an internal more-like pager to dis‐
play a screenful of possible completions at a time.
OK, and it looks like:
final.target
first-boot-complete.target
fstrim.service
fstrim.timer
--More--
But if I c
Man bash says
Readline Variables
Readline has variables that can be used to further customize its behav‐
ior. A variable may be set in the inputrc file with a statement of the
form
set variable-name value
or using the bind builtin command (see SHELL B
My experiments,
https://github.com/scop/bash-completion/issues/489
"prove" that
set skip-completed-text on
should be the default, not off.
$ man bash #and
$ help test #say
-a FILETrue if file exists.
-e FILETrue if file exists.
OK, but add a note that it would be better to use -e,
as it is more portable.
Compare
$ test -a .
$ /usr/bin/test -a .
$ help history
-d offset delete the history entry at offset OFFSET.
-aappend history lines from this session to the history file
-nread all history lines not already read from the history file
-rread the history file and append the contents to the his
# dpkg -i /var/cache/apt/archives/phpmyadmin_4%3a4. shows
phpmyadmin_4%3a4.4.15-1_all.deb phpmyadmin_4%3a4.5.0.2-2_all.deb
# dpkg -i /var/cache/apt/archives/phpmyadmin_4%3a4.
Can you please make the first different character bold, like emacs does,
Possible completions are:
phpmyadmin_4%3a4.4.15
> "CR" == Chet Ramey writes:
CR> There is an option in readline-7.0 that will cause completion to display
CR> the common prefix of a set of possible completions in a distinctive
CR> color. This has essentially the same visual effect.
OK. I see http://packages.debian.org/readline-common is o
Type ^Racb^C^R^R
(Search backwards for abc, then hit ^C, then try searching backwards
some more using the last search string.)
My problem is why must bash zap the memory of abc just because we hit ^C?
DW> On Fri, Oct 16, 2015 at 1:50 PM, Chet Ramey wrote:
DW> ^C rudely aborts the entire operation. Why assume you want to save any
DW> of the context?
Because I got a phone call: the boss asked me to execute a shell
command. I used ^C to get myself back to a prompt so I could type in the
> "CFAJ" == Chris F A Johnson writes:
CFAJ> Or just press UP (as many times as necessary) and RET.
That won't get me to a $ prompt.
I want to suspend my search and resume it later.
> "DW" == Dennis Williamson writes:
DW> Or just open a new terminal rather than interrupting an in-progress search.
I am on a device where opening a new terminal is a lot of trouble.
> "CFAJ" == Chris F A Johnson writes:
CFAJ> ^Z then fg
^Rsearch_string^Z^Z^Z^Z
the ^Z's are ignored. I can't get back to a prompt with ^Z.
> "DR" == Dave Rutherford writes:
DR> Can you run gnu screen? ^A-c will get you a new shell session in the
DR> existing terminal emulator (it will use a new terminal device, though,
DR> if that's what you care about.)
Let's pretend that I am on a gunk device on a gunk OS and all I have to
wo
> Press Ctrl-u
OK I see this also works for
$ ^Rabcdefg^U
$ some command the boss told me to do
$ ^R^R
and voila! I am back to searching "abcdefg" again.
OK, I'll remember ^U. Case closed. Thanks everybody.
$ strings /bin/bash | grep -c prefer-visible-bell
1
$ man bash | grep -c prefer-visible-bell
0
$ find /usr/share/doc/bash* -type f | xargs zgrep prefer-visible-bell | wc -l
0
OK then please add
dump-functions
Print all of the functions and their key bindings to the read-
line output stream. If a numeric argument is supplied, the out-
put is formatted in such a way that it can be made part of an
inputr
$ help complete
...
Options:
-pprint existing completion specifications in a reusable format
-rremove a completion specification for each NAME, or, if no
NAMEs are supplied, all completion specifications
-Dapply the completions and actio
Man page says:
When a shell with history enabled exits...
and
The shell exits by default upon receipt of a SIGHUP...
However on slower systems, at the end of the day when the user issues
the poweroff(8) command, all this might not complete, resulting in the
entire day's of history getting thr
GW> I'm confused. You don't logout before shutting down your computer?
GW> I would strongly recommend doing so, unless it's an emergency.
All I know is I want to issue one command to turn off the computer.
If I logged off first, how could I issue that (poweroff(8)) command?
OK you people turn of
GW> Log out, log back in as root, issue the command, and accept that root's
GW> (very short) shell history will be lost.
Well mention that on the man page.
I.e., the man page should address the paradox of saving a complete
history vs. being able to turn off one's computer.
Maybe bash should catch this
$ echo x > a > b > c > d
and print a warning.
Same with
$ cat < a < b < c < d
OK sorry. I guess they make a lot of sense.
OK. (But shellcheck doesn't catch it either.)
$ { echo '#!/bin/sh'; echo 'echo x > c > c > c';}|shellcheck /dev/stdin
$ { echo '#!/bin/sh'; echo 'echo x < c < c < c';}|shellcheck /dev/stdin
New idea: you've searched way back in history (^R), found what you want,
and hit RET, only to realize that you really wanted to hit ^O.
Well now you have to search all over again (^R) and then hit ^N to get
the same effect.
Well perhaps there could be a "morning after pill" keystroke added. Bash
# su - nobody
$ touch kam kaam kam
$ : k*m #becomes:
$ : kam
$ sh
sh-4.4$ : k*m #does a better job it seems:
kam kaam kam
sh-4.4$ : k*m
$ apt-cache policy bash bash-completion
bash:
Installed: 4.4-5 ...
bash-completion:
Installed: 1:2.1-4.3 ...
OK
$ INPUTRC=/dev/null bash
$ : k*m
kam kaam kam
OK I suppose I should report a bug against the bash-completion package.
101 - 145 of 145 matches
Mail list logo