Преглед на файлове

Alias 'gitnonymous-exit' deactivates identity.

master
Chris McCormick преди 6 години
родител
ревизия
96bb86c3e2
променени са 2 файла, в които са добавени 8 реда и са изтрити 3 реда
  1. 3
    3
      README.md
  2. 5
    0
      gitnonymous

+ 3
- 3
README.md Целия файл

@@ -59,9 +59,9 @@ Your prompt will be updated to reflect the configured environment:
59 59
 
60 60
 	KEYNAME⚔ yourname@yourbox:~$
61 61
 
62
-To deactivate the gitnonymous environment run the same command again:
62
+To deactivate the gitnonymous environment run `gitnonymous-exit`:
63 63
 
64
-	KEYNAME⚔ yourname@yourbox:~$ . gitnonymous KEYNAME
64
+	KEYNAME⚔ yourname@yourbox:~$ gitnonymous-exit
65 65
 	yourname@yourbox:~$ _
66 66
 
67 67
 Or just exit the current shell.
@@ -70,7 +70,7 @@ Or just exit the current shell.
70 70
 
71 71
 Whilst this will help you adopt a pseudonymous virtual identity, you should be aware of the following information leaks that may still be used to try to identify you, pointed out by @ryancdotorg on Hacker News:
72 72
 
73
- * Commit times will be leaked (narrows down sleeping/working hours).
73
+ * Commit times will be leaked (narrows down sleeping/working hours), although timezone is not exposed.
74 74
  * SSH client version will be leaked to servers you connect to (shows Linux distro version and patch level).
75 75
 
76 76
 ## Dependencies ##

+ 5
- 0
gitnonymous Целия файл

@@ -75,6 +75,7 @@ then
75 75
       # unset our environment variables we set
76 76
       unset _GITNONYMOUS_OLDPS1
77 77
       unset _GITNONYMOUS
78
+      unalias "gitnonymous-exit"
78 79
       echo "Done unsetting ${keyname}."
79 80
     else
80 81
       # add our custom local SSH key (make the key with ./make-anonymous-key)
@@ -127,6 +128,10 @@ then
127 128
       _GITNONYMOUS_OLDPS1="${PS1}"
128 129
       export PS1="${keyname}⚔ ${PS1}"
129 130
       export _GITNONYMOUS="${keyname}"
131
+
132
+      echo "Run 'gitnonymous-exit' to exit this identity."
133
+      # alias exit command
134
+      alias "gitnonymous-exit"=". ${BASH_SOURCE[0]} ${keyname}"
130 135
     fi
131 136
   fi
132 137
 else

Loading…
Отказ
Запис