You are not logged in.

#1 2021-05-09 10:52:22

thorstenhirsch
Member
Registered: 2005-08-03
Posts: 127

[SOLVED] zsh: how to disable interpolation of ^ (circumflex, caret)?

My problem: zsh is interpolating ^ somehow to 'Calibre Library' and 'bin', which are subdirectories...

zsh:

$ sudo mkfs.ext4 -O ^has_journal /dev/sdd1
mke2fs 1.46.2 (28-Feb-2021)
mkfs.ext4: invalid blocks 'Calibre Library' on device 'bin'

bash:

$ sudo mkfs.ext4 -O ^has_journal /dev/sdd1
mke2fs 1.46.2 (28-Feb-2021)
/dev/sdd1 contains a ext4 file system
	created on Sun May  9 12:43:53 2021
Proceed anyway? (y,N) y
Creating filesystem with 58607505 4k blocks and 14655488 inodes
...

Any idea how to tell zsh not to interpolate the caret/circumflex character?

Last edited by thorstenhirsch (2021-05-12 17:29:24)

Offline

#2 2021-05-09 12:24:46

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,490

Re: [SOLVED] zsh: how to disable interpolation of ^ (circumflex, caret)?

http://zsh.sourceforge.net/Doc/Release/ … Generation

sudo mkfs.ext4 -O '^has_journal' /dev/sdd1

Online

#3 2021-05-12 05:23:37

thorstenhirsch
Member
Registered: 2005-08-03
Posts: 127

Re: [SOLVED] zsh: how to disable interpolation of ^ (circumflex, caret)?

Thanks, Seth!

I also found out that I had activated "extendedglob" in zsh. Without it the caret is not being interpolated/expanded.

Offline

#4 2021-05-12 06:42:35

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,490

Re: [SOLVED] zsh: how to disable interpolation of ^ (circumflex, caret)?

Matter of preference - extendedglob has some benefits, but you'll have to quote few more chars.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Online

#5 2021-05-12 17:29:39

thorstenhirsch
Member
Registered: 2005-08-03
Posts: 127

Re: [SOLVED] zsh: how to disable interpolation of ^ (circumflex, caret)?

Done.

Offline

Board footer

Powered by FluxBB