[conspire] curious behavior of bash completion when there's a character that needs to be escaped e.g. $
Peter Knaggs
peter.knaggs at gmail.com
Wed Jan 15 12:03:44 PST 2020
Hi Deirdre,
I agree, oftentimes I do resort to python3 when dealing with complicated
filenames.
In the bash manual it says that shopt is a bash builtin that allows us to
change additional shell optional behavior. The progcomp option is
apparently
supposed to be set by default (this doesn't seem to be the case on Debian 10
though), and it enables "programmable completion facilities", I'm still
reading about
this fascinating rabbit hole:
https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion.html#Programmable-Completion
Still, I recently came across the wonderful benefit of running "detox" on
my files, so now I hardly ever have any complicated filenames, at least
on my home machines. Detox can be run recursively too, it even has a
neat "dry run" option to see how it'll choose to rename the files.
For example, to see how it'll recursively rename the files under /full/path
I use it like this:
detox -r --dry-run /full/path
Cheers,
Peter.
On Wed, Jan 15, 2020 at 11:51 AM Deirdre Saoirse Moen <deirdre at deirdre.net>
wrote:
> On Jan 15, 2020, at 11:30, Peter Knaggs <peter.knaggs at gmail.com> wrote:
>
>
> Hmm, if I first run this command, the bash completion works as I'd expect
> in Debian 10, I guess I'll have to look into what this command does. :)
>
> shopt -u progcomp
>
>
> https://askubuntu.com/questions/70750/how-to-get-bash-to-stop-escaping-during-tab-completion
>
>
> Huh. I’m glad you figured it out because I realized I didn’t know the
> answer off the top of my head. Then again, I’m likely to break out a
> higher-level language once it gets to that point rather than stick with
> shell.
>
> Deirdre
> _______________________________________________
> conspire mailing list
> conspire at linuxmafia.com
> http://linuxmafia.com/mailman/listinfo/conspire
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://linuxmafia.com/pipermail/conspire/attachments/20200115/67764ef7/attachment-0001.html>
More information about the conspire
mailing list