chain commands in the prompt_command with ; rather than &&

pull/18/head
Joël Schaerer 14 years ago
parent 4f9d0254a2
commit 6b9880dc47

@ -13,7 +13,7 @@ autojump is a faster way to navigate your filesystem. It works by maintaining a
j dirspec
where dirspec is a few characters of the directory you want to jump to. It will jump to the most used directory whose
name matches the pattern given in dirspec. Note that autojump isn't meant to be a drop-in replacement for cd, but rather a complement. Cd is fine when staying in the same area of the filesystem; autojump is there to help you when you need to jump far away from your current location.
name matches the pattern given in dirspec. Note that autojump isn't meant to be a drop-in replacement for cd, but rather a complement. Cd is fine when staying in the same area of the filesystem; autojump is there to help when you need to jump far away from your current location.
Autojump supports tab completion. Try it! Autojump should be compatible with bash 4. Please report any problems!

@ -20,7 +20,7 @@ command shows you the current contents of the database. You need to work a littl
.B j
dirspec
.P
where dirspec is a few characters of the directory you want to jump to. It will jump to the most used directory whose name matches the pattern given in dirspec. Note that autojump isn't meant to be a drop-in replacement for cd, but rather a complement. Cd is fine when staying in the same area of the filesystem; autojump is there to help you when you need to jump far away from your current location.
where dirspec is a few characters of the directory you want to jump to. It will jump to the most used directory whose name matches the pattern given in dirspec. Note that autojump isn't meant to be a drop-in replacement for cd, but rather a complement. Cd is fine when staying in the same area of the filesystem; autojump is there to help when you need to jump far away from your current location.
.P
Autojump supports autocompletion. Try it!
.SH EXAMPLES

@ -42,7 +42,7 @@ fi
AUTOJUMP='{ (autojump -a "$(pwd -P)"&)>/dev/null 2>>${AUTOJUMP_DATA_DIR}/.autojump_errors;} 2>/dev/null'
if [[ ! $PROMPT_COMMAND =~ autojump ]]; then
export PROMPT_COMMAND="${PROMPT_COMMAND:-:} && $AUTOJUMP"
export PROMPT_COMMAND="${PROMPT_COMMAND:-:} ; $AUTOJUMP"
fi
alias jumpstat="autojump --stat"
function j { new_path="$(autojump $@)";if [ -n "$new_path" ]; then echo -e "\\033[31m${new_path}\\033[0m"; cd "$new_path";fi }

Loading…
Cancel
Save