I'm trying to revive my knowledge of the command line interface, but can't remember how to change to the home directory. I'm actually trying to learn Git, so the help documentation assume I remember all the commands. I remember
That's what the help docs say also, but when I am in Windows command prompt and type cd ~, I get a message that says The system cannot find the path specified. And when I type pwd I get a message that says PWD is not recognized as an external or internal command, batch file, etc. Since I'm trying to learn Git, I should probably be using the Git bash [sp?] shell, but every time I do anything using that, it also spits out a line of characters that confuses me, while the command prompt in Windows has a prompt that also tells me what directory I am in, which I find very useful. This is probably all way more info than you wanted *smile*, but once the instructor got us to use Git to get our web pages onto GitHub, I got sort of hooked on learning more on my own.
Also, none of the docs mentioned that, when I first open the Windows command line, I am automatically in the home directory. I've now created a directory in the home directory titled "repos," and a subdirectory in that titled "myproj." Is it because I am working within a subdirectory of the home directory that I'm getting those error messages?
Now I see that the Git bash interface does include the pwd in the prompt, it just has an alphanumeric string before it includes the directory. Also, the Git bash interface doesn't read results to me like the Windows command prompt interface does, so I have to switch cursors and then locate the message, read it with the Jaws cursor, then switch back to the main cursor to type in a command. I'm sure some blind geeks somewhere have an add-on or a script that improves the accessibility for screen readers, so I'm off to try to find it.
Aha! The "The system cannot find the path specified." message means you're using Windows Command Prompt, which has its own syntax and whatnot. Command Prompt almost at the end of its life, so it may not worth investing in knowledge of it.
I don't know windows Command Prompt language much at all, but it shares some of the same commands as bash--just enough to be really confusing! And as yo say git does come with the git-bash program, which has a version of the bash shell, so that might be the one to use.
You can customize the bash prompt so it says whatever--including which git branch you are on (when you get to that step in your git learning). But getting it right is a little finicky, since it uses a lot of percent-string escape clauses (e.g. %~ for the current path including showing home as tilde).
I don't know which shells work well with screen readers, or if you can find a .bashrc file which will set you up with some sensible defaults, but there's got to be someone who has done some work in this area.
Eeew. Well, that's annoying. I do hope you find a terminal program that reads as it prints.
As mentioned above you can customize the prompt; if you edit a file named ~/.bashrc (i.e. named .bashrc in your home directory) you can add a line like this:
PS1='\\w '
That'll change your prompt to just your current path, with a space after it. Replace the w with a capital W if you want it to only have the last element of the path (i.e. the folder you are in, rather than the whole path to that folder).
For more on bash prompt changing, page looked like it might be helpful and laid out well:
Thank you for the tips. I did find this, which identifies the extra letters in the bash prompt Using bash shell for Windows https://www.logicbig.com/tutorials/misc/git/git-bash-shell.html What is Git Bash emulation? MINGW64 is short for Minimalist GNU for Windows 64 bits. It provides open source programming tool set for windows system.
no subject
Date: 2020-09-23 09:58 pm (UTC)(In some shells, simply typing cd with no arguments will also get you there.)
no subject
Date: 2020-09-24 09:56 am (UTC)And when I type pwd I get a message that says PWD is not recognized as an external or internal command, batch file, etc.
Since I'm trying to learn Git, I should probably be using the Git bash [sp?] shell, but every time I do anything using that, it also spits out a line of characters that confuses me, while the command prompt in Windows has a prompt that also tells me what directory I am in, which I find very useful.
This is probably all way more info than you wanted *smile*, but once the instructor got us to use Git to get our web pages onto GitHub, I got sort of hooked on learning more on my own.
no subject
Date: 2020-09-24 10:01 am (UTC)no subject
Date: 2020-09-24 03:40 pm (UTC)no subject
Date: 2020-09-25 02:48 am (UTC)I don't know windows Command Prompt language much at all, but it shares some of the same commands as bash--just enough to be really confusing! And as yo say git does come with the git-bash program, which has a version of the bash shell, so that might be the one to use.
You can customize the bash prompt so it says whatever--including which git branch you are on (when you get to that step in your git learning). But getting it right is a little finicky, since it uses a lot of percent-string escape clauses (e.g. %~ for the current path including showing home as tilde).
I don't know which shells work well with screen readers, or if you can find a .bashrc file which will set you up with some sensible defaults, but there's got to be someone who has done some work in this area.
no subject
Date: 2020-09-25 02:55 am (UTC)As mentioned above you can customize the prompt; if you edit a file named ~/.bashrc (i.e. named .bashrc in your home directory) you can add a line like this:
PS1='\\w '
That'll change your prompt to just your current path, with a space after it. Replace the w with a capital W if you want it to only have the last element of the path (i.e. the folder you are in, rather than the whole path to that folder).
For more on bash prompt changing, page looked like it might be helpful and laid out well:
https://linuxconfig.org/bash-prompt-basics
no subject
Date: 2020-09-25 10:45 am (UTC)I did find this, which identifies the extra letters in the bash prompt
Using bash shell for Windows
https://www.logicbig.com/tutorials/misc/git/git-bash-shell.html
What is Git Bash emulation?
MINGW64 is short for Minimalist GNU for Windows 64 bits. It provides open source programming tool set for windows system.
Thanks again!