Skip to content

Commit

Permalink
removed moa logging the last command - instead makin sure the bash hi…
Browse files Browse the repository at this point in the history
…story is flushed to disk using 'history -a'
  • Loading branch information
Mark Fiers committed Nov 30, 2012
1 parent 70eea4c commit 24c4aed
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions moa/data/etc/profile.d/moa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,13 @@ function _moa_prompt {
local lc=$(history 1)
lc="${lc# *[0-9]* }"

#save the last command to a user specific location
if [[ ! -d '~/.config/moa' ]]
then
mkdir -p ~/.config/moa
fi
echo $lc > ~/.config/moa/last.command
#make sure history is flushed
history -a

#if not in a moa dir - stop here
[[ -d '.moa' ]] || return 0

#and add it to the local history if this is a mob job
#and add the last history command to a local history
if [[ -w '.moa' ]]
then
if [[ ! -a '.moa/local_bash_history' ]]
Expand Down

0 comments on commit 24c4aed

Please sign in to comment.