mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
Fix default autojump behavior when run with 0 arguments.
This commit is contained in:
parent
25d1b9cf92
commit
079abfdbe6
4
autojump
4
autojump
@ -220,7 +220,7 @@ def shell_utility():
|
|||||||
"""Run this when autojump is called as a shell utility"""
|
"""Run this when autojump is called as a shell utility"""
|
||||||
parser = argparse.ArgumentParser(description='Automatically jump to directory passed as an argument.',
|
parser = argparse.ArgumentParser(description='Automatically jump to directory passed as an argument.',
|
||||||
epilog="Please see autojump(1) man pages for full documentation.")
|
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')
|
help='directory to jump to')
|
||||||
parser.add_argument('-a', '--add', metavar='DIR', type=unicode,
|
parser.add_argument('-a', '--add', metavar='DIR', type=unicode,
|
||||||
help='add path to database')
|
help='add path to database')
|
||||||
@ -261,7 +261,7 @@ def shell_utility():
|
|||||||
#default: gradually forget about old directories
|
#default: gradually forget about old directories
|
||||||
if (not args.completion): forget(path_dict, dic_file)
|
if (not args.completion): forget(path_dict, dic_file)
|
||||||
|
|
||||||
if (args.directory == None):
|
if (args.directory == u''):
|
||||||
patterns = [unico("")]
|
patterns = [unico("")]
|
||||||
else:
|
else:
|
||||||
patterns = [decode(a) for a in args.directory]
|
patterns = [decode(a) for a in args.directory]
|
||||||
|
Loading…
Reference in New Issue
Block a user