[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bash not escaping escape sequences in directory names
From: |
Lawrence Velázquez |
Subject: |
Re: Bash not escaping escape sequences in directory names |
Date: |
Fri, 21 Jan 2022 01:43:57 -0500 |
User-agent: |
Cyrus-JMAP/3.5.0-alpha0-4585-ga9d9773056-fm-20220113.001-ga9d97730 |
On Tue, Jan 18, 2022, at 9:13 PM, Josh Harcombe wrote:
> If a folder that is being displayed as part of the PS1 prompt contains
> escape sequences, bash will interpret them literally instead of escaping
> them like zsh does for example. Escape sequences should be fine if directly
> part of the prompt string and I'm not aware of any way for this to cause
> issues other than messing with the prompt string in potentially unexpected
> ways.
Depends what you consider to be an issue. Personally, I would be
less than pleased if my whole terminal turned red just because I
changed into a directory that happened to have a weird name.
% PS1='\w \$ ' bash
/tmp $ dir=$'\e[31m\e[41m\e[2J'
/tmp $ mkdir "$dir"
/tmp $ cd "$dir" # lol
--
vq
- Bash not escaping escape sequences in directory names, Josh Harcombe, 2022/01/18
- Re: Bash not escaping escape sequences in directory names, Alex fxmbsw7 Ratchev, 2022/01/19
- Re: Bash not escaping escape sequences in directory names, L A Walsh, 2022/01/21
- Re: Bash not escaping escape sequences in directory names, Alex fxmbsw7 Ratchev, 2022/01/21
- Re: Bash not escaping escape sequences in directory names, Lawrence Velázquez, 2022/01/21
- Re: Bash not escaping escape sequences in directory names, Alex fxmbsw7 Ratchev, 2022/01/21
- Re: Bash not escaping escape sequences in directory names, L A Walsh, 2022/01/22
- Re: Bash not escaping escape sequences in directory names, Lawrence Velázquez, 2022/01/22
Re: Bash not escaping escape sequences in directory names,
Lawrence Velázquez <=
- Re: Bash not escaping escape sequences in directory names, Chet Ramey, 2022/01/21
- Re: Bash not escaping escape sequences in directory names, Mike Jonkmans, 2022/01/21
- Re: Bash not escaping escape sequences in directory names, Chet Ramey, 2022/01/21
- Re: Bash not escaping escape sequences in directory names, Andreas Kusalananda Kähäri, 2022/01/22
- Re: Bash not escaping escape sequences in directory names, Koichi Murase, 2022/01/22
- Re: Bash not escaping escape sequences in directory names, Chet Ramey, 2022/01/22
- Re: Bash not escaping escape sequences in directory names, Andreas Kusalananda Kähäri, 2022/01/22
- Re: Bash not escaping escape sequences in directory names, Chet Ramey, 2022/01/24
- Re: Bash not escaping escape sequences in directory names, Andreas Kusalananda Kähäri, 2022/01/24
- Re: Bash not escaping escape sequences in directory names, Greg Wooledge, 2022/01/24