Skip to content

Commit 70d8878

Browse files
committed
fix merge conflicts
2 parents 8b47faa + f76619a commit 70d8878

File tree

3 files changed

+28
-5
lines changed

3 files changed

+28
-5
lines changed

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,23 @@ $ goto github
2424

2525
### Setup
2626

27-
#### Mac OS-X / Linux
27+
#### Mac OS-X / Linux / Win (git bash)
2828
```
2929
pip install magicgoto
3030
```
3131
After install, close and reopen your terminal.
3232

3333
#### Windows (using gitbash)
34-
Do the same as above, but **open git bash as Administrator**
34+
Open git bash and do the same as above.
35+
36+
37+
git bash is included when you install git on windows usually.
38+
39+
Some git bash installs comes without any rcfile.
40+
If you get this error: `Ah hoy! Failed to determine rcfile...`
41+
you can fix it by running`touch ~/.bash_profile` and then `install_goto`
42+
43+
3544

3645

3746
#### Linux - User Site install

goto/commands/__init__.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@
1313
commands[name] = command
1414

1515

16-
usage, _ = help.run(None,None,None,None)
16+
def usage():
17+
'''
18+
Making this a procedure to avoid that the help_text could
19+
be outdated if any later methods inject plugins or other commands.
20+
21+
This will evaluate the help text for all
22+
installed commands.
23+
'''
24+
help_text, _ = help.run(None, None, None, None)
25+
return help_text
26+
1727

1828
__all__ = ['usage', 'commands', 'commands_list']

goto/the_real_goto.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from .plugins import plugins
1818

1919

20+
2021
def main():
2122
fix_python2()
2223
make_sure_we_print_in_utf8()
@@ -65,15 +66,18 @@ def exit_if_unhealthy():
6566

6667
def exit_with_usage_if_needed():
6768
if len(sys.argv) < 3:
68-
print_utf8(usage)
69+
print_usage()
6970
exit(0)
7071

7172

7273
def exit_if_no_command_and_no_args(command, args):
7374
if not command and len(args) == 0:
74-
print_utf8(usage)
75+
print_usage()
7576
exit(0)
7677

7778

79+
def print_usage():
80+
print_utf8(usage())
81+
7882
if __name__ == '__main__':
7983
main()

0 commit comments

Comments
 (0)