weird chars on tab completition terminal - shell

I am using putty to connect to the a server.
Whenever i press tab.. for file name completion... it puts some weird character..
the ups and downs arrow doesnt work.. and ulimately i end up typing everything.. (the file names..)
for example
directory has file.. foo.py foo.txt
$python foo.py fo[tab].... i am hoping to see the selections.. (foo.py, foo.txt) and stuff
and it shows that...but it also adds a char to the end..and if i try to erase it.. it puts more characters in the end.. :(
Any suggestions on what might be the issue?
Thanks

Autocomplete and history depends on what environment the server is running. So I'm afraid there's nothing to enable from the client-side. If you can find out what environment the server is running and you have write-access, then maybe you could find some environment-specific edits to be made (to config files and such).

Related

How do I troubleshoot a zshrc file stuck with settings added using `code ~/zshrc.`

I used code ~/zshrc. to go into the file and do some custom styling for my terminal. One of those things I added was echo -e " \e[5m \e[25m" which causes my command line to blink if I haven't initialized git tracking. I did it just for fun and decided after pressing cmd + q in vs code that I wanted to change it. However, this was lost and now when I run code ~/zshrc. it brings me to a blank file with none of the settings I personally added. When I did this I was definitely in my home directory. I'm wondering if there is any way I can undo some changes, go back to the way it was on a previous day, or just reset. Any recommendations? My terminal is not usable with everything flashing. Even running ls all my directories are flashing and I can hardly read it.
Thought I'd post an update. After a break, I came back the next day and noticed that the command I should've been running was code ~/.zshrc and not code ~/zshrc.. That fixed the whole problem so I could edit my zshrc file.

Use only a single Geany instance under Windows

I'm running Geany 1.34.1 under Windows 10. Whenever I click a text file on Windows Explorer Geany opens the file in a new instance.
How can I configure Geany so that it opens all files in a single instance only?
According to a section of the Geany documentation, the behavior you want should occur unless Geany is started with the appropriate command line option. From the table of command line options, that would be either -i or --new-instance.
Check your file type association for text files and delete either of those command line options if they're there.
If no options are found, you might check your Geany configuration file to see if there's something related to starting a new instance. If so, you can try deleting the related stuff and see what happens. Be sure to make a backup copy of the configuration file before editing it so you can recover in case something goes terribly wrong.
If no options are found anywhere, then it may be a bug in the Windows version of Geany.

Batch wont execute but just re-print its content

No matter what my code is, even if my batch file is syntactically incorrect, even if it is absolutely correct and even if there is nothing to display on the screen the batch file when executed just displays the code as it is.
I read a similar question MSDOS prints the whole batch file on screen instead of executing but since that was on MS-DOS I hoped my issue could have a solution different than that.
Eg,
#echo off
set abcd=4
Even its batch file would just display the same lines as it is.
Please help.
Try "resetting" cmd if possible. U can try copying someone else's "cmd.exe" and replace it with yours using another bootable OS as windows wont allow that.
Here use my cmd.exe. https://drive.google.com/open?id=0B6ghonMKBfUSLVpRV0U5bG5pQTQ
Just in case u need to know I am using Windows 10 64 bit.
Check the file with an editor that allows you to see the encoding.
For example Notepad++ , you will see is very different the end of line via CF (\r) and LF (\n)
Your CMD can be recognizing EOL via \n only.
To determine whether your issue is really with line breaks being converted by your text editor (as the post you mention suggests), perform the following test:
Open a Command Line Window
Type the following command: copy con test.bat
The cursor will reposition itself under the command prompt, this is normal
Type the following 3 commands, each followed by the [Enter] key:
.
Echo Off
Set abcd=4
Echo abcd
Press CTRL-Z simultaneously (it will show up on screen as ^Z)
A confimation message should state: 1 file(s) copied.
Now type Test to run the batch file. If it runs properly, it means you are indeed dealing with line termination issues. Use a different text editor (don't use Notepad!!!), ideally one where you have an option to display the line termination characters (I personnally use NotePad++, it works great for these kinds of things but there are many others out there).
Perhaps there is a problem with your environment variables. Check the following:
Press WIN + R and run "%SYSTEMROOT%\System32\SystemPropertiesAdvanced.exe"
Click on "Environment Variables"
The system variables are listed at the bottom. Select the variable "Path" and click "Edit..."
Check whether the list contains "C:\Windows\System32" or "%SYSTEMROOT%\System32". If not, add one of those. You may have to restart your computer afterwards.

Run .bat file as Administrator, get old version?

This is just bizarre. I've got a .bat file that I run using Windows 7's scheduler, and I noticed after I made an update to it, that it was still acting as though it were running the old version of the .bat program.
It's easy to tell which one ran - they output to a .txt file, and the new version dumps a lot more information. So here's what happens under three scenarios:
Open a cmd window (with right-click and "Run As Administrator"). CD to the directory and execute setvispw.bat in the usual way, by typing "setvispw.bat" and hitting Enter.
Result: current version runs as expected.
Right-click setvispw.bat and "Open"
Result: current version runs as expected. But that's not good, because I'm changing another user's password and need Admin privileges.
Right-click setvispw.bat and "Run As Administrator".
Result: something else runs! It looks like it's running the version from before I made changes to the .bat just a few days ago.
So I tried something even more strange. I replaced my functional program with a dummy program... and it was running the dummy program.
Finally, I added some "pause" statements... and that's when I got the answer. Rather than discard this bit of troubleshooting, I'll use the "Answer your own darned question" feature.
It turns out the problem was that I was depending on the output to setvispw.bat to tell me what version of the program had run. Well, both the old and new versions had this line:
echo Random string is !_RndAlphaNum! > C:\pathname\curVisitorPW.txt
But my added line was like this:
echo Sending email: >> curVisitorPW.txt
When I ran from C:\pathname, either in a CMD window or without Admin privileges, it worked just fine. But when I ran with Admin privs, like it does from the Scheduler, the working directory isn't C:\pathname - it's C:\Windows\System32. I didn't see that until I added the "pause" and saw that I wasn't running where I expeted! Sure enough, there's a curVisitorPW.txt sitting there in System32.
The solution, of course, was simple - use the fully qualified pathname.
Hopefully this will come in handy if someone like me is seeing bizarre behavior in a .bat file, and starts wondering if there's some sort of caching, or admin permissions/privileges, or something else crazy. I was ready to pin it on gremlins, myself.

Using VIM on Windows to access windows server share directory

In Windows Explorer I can navigate to "\\servername\shared_directory". Is there any way I can navigate to the same directory using VIM and NERDTree?
Example:
:NERDTree \\servername\shared_drirectory
I think you might want to report this behavior to the NERDTree developer. I tried it myself and no, it does not work.
You could try pulling the current NERDTree from https://github.com/scrooloose/nerdtree or writing the developer.
I don't use NERDTree, but both :browse e \\servername\shared_directory and :e \\servername\shared_directory\filename.txt work fine for me in gvim.
Playing with this a bit more, I see that the forward-slash syntax seems to even work with tab-completion (after I get the server and initial directory right, of course).
If NERDTree doesn't want to work with either //servername/directory or \\servername\directory, you might want to try executing a :lcd //servername/directory first, followed by :NERDTree ..
This issue was fixed in this branch : https://github.com/actionshrimp/nerdtree .
Download nerdtree from https://github.com/actionshrimp/nerdtree/downloads

Resources