powerlevel10k icon indicating copy to clipboard operation
powerlevel10k copied to clipboard

detect_virt segment shows false positive "chroot" for btrfs

Open piggynl opened this issue 2 years ago • 0 comments

https://github.com/romkatv/powerlevel10k/blob/cf83ab21e440ffa276a13ab5fd63b6372b674b5e/internal/p10k.zsh#L2274-L2285

Btrfs subvolumes always have inode number 256 instead of 2, so detect_virt segment will show false positive "chroot" for btrfs.

Maybe we can check the return value of unshare -U true to determine whether we are in chroot? But it will be much slower :(

piggynl avatar Nov 23 '22 07:11 piggynl