Skip to content

Commit

Permalink
Fix default autojump behavior when run with 0 arguments.
Browse files Browse the repository at this point in the history
  • Loading branch information
wting committed Apr 7, 2012
1 parent 25d1b9c commit 079abfd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autojump
Expand Up @@ -220,7 +220,7 @@ def shell_utility():
"""Run this when autojump is called as a shell utility"""
parser = argparse.ArgumentParser(description='Automatically jump to directory passed as an argument.',
epilog="Please see autojump(1) man pages for full documentation.")
parser.add_argument('directory', metavar='DIR', type=unicode, nargs='*', default=None,
parser.add_argument('directory', metavar='DIR', type=unicode, nargs='*', default=u'',
help='directory to jump to')
parser.add_argument('-a', '--add', metavar='DIR', type=unicode,
help='add path to database')
Expand Down Expand Up @@ -261,7 +261,7 @@ def shell_utility():
#default: gradually forget about old directories
if (not args.completion): forget(path_dict, dic_file)

if (args.directory == None):
if (args.directory == u''):
patterns = [unico("")]
else:
patterns = [decode(a) for a in args.directory]
Expand Down

0 comments on commit 079abfd

Please sign in to comment.