zsh interpret some %[a-z] in command line
Bug #435336 reported by
Pierre Chef
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zsh (Ubuntu) |
Invalid
|
Low
|
Unassigned |
Bug Description
Binary package hint: zsh
On command line, zsh interprets some %<letter> without possibility to escape it.
It is especially a problem with date which uses % in its format.
zsh /tmp$ date "+%d/%m %kh%M"
]0;date "+/tmp/ubuntu hubuntu"23/09 17h15
bash /tmp$ date "+%d/%m %kh%M"
23/09 17h15
This bug only appears on command line, not in script or when you pipe commands
zsh /tmp$ date "+%d/%m %kh%M" | less
will show the good result in less.
zsh 4.3.9-4ubuntu1
bash 3.2-5ubuntu1
coreutils 6.10-6ubuntu1
To post a comment you must log in.
In fact, it is due to this line in prexec used to put the current command in the terminal title.
preexec() {
print -Pn "\e]0;$1\a"
}
I found this information here https:/ /bbs.archlinux. org/viewtopic. php?id= 107834