mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
fix minor fish shell commands
This commit is contained in:
parent
c15996db19
commit
77eddd3c0b
@ -3,17 +3,15 @@ if test -d ~/.autojump
|
||||
set -x PATH ~/.autojump/bin $PATH
|
||||
end
|
||||
|
||||
set -x AUTOJUMP_HOME $HOME
|
||||
|
||||
|
||||
# enable tab completion
|
||||
complete -x -c j -a '(autojump --bash --complete (commandline -t))'
|
||||
complete -x -c j -a '(autojump --complete (commandline -t))'
|
||||
|
||||
|
||||
# change pwd hook
|
||||
function __aj_add --on-variable PWD
|
||||
status --is-command-substitution; and return
|
||||
autojump -a (pwd) &>/dev/null &
|
||||
autojump -a (pwd) >/dev/null &
|
||||
end
|
||||
|
||||
|
||||
|
30
install.py
30
install.py
@ -109,27 +109,31 @@ def parse_arguments():
|
||||
|
||||
|
||||
def print_post_installation_message(etc_dir):
|
||||
aj_shell = '%s/autojump.sh' % etc_dir
|
||||
source_msg = "\t[[ -s %s ]] && source %s\n" % (aj_shell, aj_shell)
|
||||
|
||||
if get_shell() == 'fish':
|
||||
rcfile = '~/.config/fish/config.fish'
|
||||
aj_shell = '%s/autojump.fish' % etc_dir
|
||||
source_msg = "if test -f %s; . %s; end" % (aj_shell, aj_shell)
|
||||
elif platform.system() == 'Darwin' and get_shell() == 'bash':
|
||||
rcfile = '~/.profile'
|
||||
else:
|
||||
rcfile = '~/.%src' % get_shell()
|
||||
|
||||
print("\nPlease manually add the following line to %s:\n" % rcfile)
|
||||
print(source_msg)
|
||||
print("Please restart terminal(s) before running autojump.\n")
|
||||
# TODO(ting|2013-12-31): check config.fish location on OSX
|
||||
rcfile = '~/.config/fish/config.fish'
|
||||
else:
|
||||
aj_shell = '%s/autojump.sh' % etc_dir
|
||||
source_msg = "[[ -s %s ]] && source %s" % (aj_shell, aj_shell)
|
||||
|
||||
if platform.system() == 'Darwin' and get_shell() == 'bash':
|
||||
rcfile = '~/.profile'
|
||||
else:
|
||||
rcfile = '~/.%src' % get_shell()
|
||||
|
||||
print("\nPlease manually add the following line to %s:" % rcfile)
|
||||
print('\n\t' + source_msg)
|
||||
print("\nPlease restart terminal(s) before running autojump.\n")
|
||||
|
||||
|
||||
def main(args):
|
||||
if args.dryrun:
|
||||
print("Installing autojump to %s (DRYRUN)..." % args.destdir)
|
||||
print("\nInstalling autojump to %s (DRYRUN)..." % args.destdir)
|
||||
else:
|
||||
print("Installing autojump to %s ..." % args.destdir)
|
||||
print("\nInstalling autojump to %s ..." % args.destdir)
|
||||
|
||||
bin_dir = os.path.join(args.destdir, args.prefix, 'bin')
|
||||
etc_dir = os.path.join(args.destdir, 'etc/profile.d')
|
||||
|
Loading…
Reference in New Issue
Block a user