Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion zsh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function __ash_last_command() {
[[ "${ASH:-0}" == "0" ]] && __ash_info __ash_last_command && return

local cmd cmd_no start_ts end_ts=$( date +%s )
read start_ts <<< "$( grep "^:" "${HISTFILE}" | tail -n1 | cut -d: -f2 )"
read start_ts <<< "$( grep -a "^:" "${HISTFILE}" | tail -n1 | cut -d: -f2 )"
read -r cmd_no cmd <<< "$( builtin history -1 )"
echo -E ${cmd_no:-0} ${start_ts:-0} ${end_ts:-0} "${cmd:-UNKNOWN}"
}
Expand Down