I'm puzzled, why do you want a directory with a carriage return in its name?

Anyway - some programs (like ls) will convert control characters to
question marks. But most don't, and your prompt string ($PS1) does not. To
avoid seeing the carriage return in your prompt, you will have to change
your prompt so it does not contain the working directory. For example,
substitute this for the last occurrence of "\w" in your PS1 variable:

   \$(pwd | tr -d \\r\\n)

That will just remove carriage returns and linefeeds from the directory
name. It will prevent the carriage returns displaying, but you will be
unable to tell the difference between repo and repo^M in your prompt.

Note that when you do "cd repo?" or "cd repo^M" (you can get "^M" by
pressing CTL-V then CTL-M), you do actually change into the directory! You
just don't see its name in the prompt. And because "pwd" will not transcode
carriage returns, it is hard to see what directory you are in. You can do
this to check what directory you are in:

   pwd | od -a

Aside from these output oddities, the directory can be used in the same
ways as any other directory.

Regards, K.



On Thu, Apr 11, 2019 at 9:50 PM <[email protected]> wrote:

> Hi Karl Auer,
>
> First, thank you very much for your answer complet Mister Karl Auer :)
>
> Exactly, the cursor drops down one line, then to the far left of the
> window.
>
> I would like on issue without rename the name of directory. I would like
> only open this repertory but i don't find in internet :(
>
> Regards,
>
> Le jeudi 11 avril 2019 10:51:24 UTC+2, Karl Auer a écrit :
>>
>> I'm not sure what you mean by "I get carriage return". Do you mean that
>> when you issue (from the parent directory) the command "cd repertoire?"
>> (that's an actual question mark) the cursor drops down one line, then to
>> the far left of the window? If so, it looks like you have somehow managed
>> to create a directory called "repertoireM" where M is an actual carriage
>> return.
>>
>> *It is harmless* - when in that directory, the remains of your command
>> prompt will appear to the right of the cursor and be overtyped by whatever
>> you type, but they will have no other effect.
>>
>> If you do not want to have that carriage return in the directory name,
>> just rename the directory:
>>
>>    mv repertoire? repertoireX
>> Or whatever name you want instead of repertoireX.
>> Alternatively, edit your command prompt. Set PS1 to whatever it is now,
>> but get rid or or replace "\w". That is the bit that is being replaced by
>> the working directory name and causing the carriage return to be displayed.
>> You can set PS1 locally (just in the current terminal) and it will apply
>> only to the current window and will be reset when you close that window. If
>> you want the change to be permanent, edit ~/.bashrc, look for where PS1 is
>> set, and make the change there. It won't take effect until .bashrc is run
>> again, of course.
>>
>> Regards, K.
>>
>>
>> On Thu, Apr 11, 2019 at 6:00 PM <[email protected]> wrote:
>>
>>> Hi all,
>>>
>>> I have Debian linux 8.11 (jessie) with Ansible.
>>>
>>> My problem is that i have two repertory :
>>>
>>> *repertoire*
>>> *repertoire?*
>>>
>>> The repertory *repertoire?* it was created since windows so there is
>>> surely the character ^M
>>>
>>> when i try open this content with command line "cd repertoire?" i get a
>>> carriage return
>>>
>>> I need this repertory for use in ansible.
>>>
>>> Someone have an idea please !!?
>>>
>>> Thanks community ansible ;)
>>>
>>> Regards,
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Ansible Project" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ansible-project/6a9aa4f5-7b02-4123-9e81-bd77ae8fea97%40googlegroups.com
>>> <https://groups.google.com/d/msgid/ansible-project/6a9aa4f5-7b02-4123-9e81-bd77ae8fea97%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>> Karl Auer
>>
>> Email  : [email protected]
>> Website: http://2pisoftware.com
>>
>> GPG/PGP : 301B 1F4E 624D AD99 242C 7A68 EC24 7113 E854 4A4E
>> Previous: 958A 2647 6C44 D376 3D63 86A5 FFB2 20BC 0257 5816
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/48a84edd-8d20-430f-b1cd-a12c3f538e70%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/48a84edd-8d20-430f-b1cd-a12c3f538e70%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Karl Auer

Email  : [email protected]
Website: http://2pisoftware.com

GPG/PGP : 301B 1F4E 624D AD99 242C 7A68 EC24 7113 E854 4A4E
Previous: 958A 2647 6C44 D376 3D63 86A5 FFB2 20BC 0257 5816

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2B%2BT08QqB5LVLBoOte%2B70AXA3jeFAacWFjQ0%2BmeU7Y_of8fT4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to