Git Product home page Git Product logo

edithosts's People

Contributors

tomchantler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

edithosts's Issues

Does not add a new line

When using the add host it does not add it on a new line so if you already have a host file with other entries it will append the new host to the last one on the list which then makes Windows think its one long host name for the previous one.

Hate to open an issue for this, but multiple entries?

Hey tom, thank you for your script(s).

I've been digging for a way to automate some of this and was pointed here. I'm entirely a layman and while I figured out how to get the script to add "a" entry (even with my preferred spacing!) I cannot figure out how to modify it to add multiple entries.

care to share an example with me of getting the script to add a second entry so i can modify it for my needs from that point? I can barely create a simple robocopy batch file so a powershell script like this is way way above and beyond!

(while im bothering you, same for the RemoveFromHosts just in case. I don't want to use up more of your time when i get to that point if its different)

If hosts file was edited previously and was not saved on a new line, the first entry wont work

It appears the script expects a fresh hosts file that is saved so that any addition will be on a brand new line. If the hosts file was previously edited and someone deleted the empty line it will append on the same line as the last entry. Example:

::1 localhost192.168.1.1 home

I'm not a powershell wizard but I'm guessing there might be a way to check if there is fresh CRLF before appending?

PowerShell odd behaviour

I had some PowerShell weirdness with the first line in any of the 3 scripts. The first line when copying the whole script was not hashed out (icon showing blue rather than green) which somehow stopped the parameters completely.

Once editing the first line to hash it out from fresh (icon then turning green) or deleting the first line completely (a reference to the author) the script seemed happy.

Not sure if I'm missing something obvious here but never seen this before and easy fix. Perhaps environmental to myself.
PowerShellHashBlue

Nevertheless - thanks for the scripts!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.