<

Parent

~detritus

maybe try `jobs | head -n -1`

also, analog watches are the best, as is anything that doesn't have a processor

Write a reply

Replies

~inquiry wrote (thread):

> maybe try `jobs | head -n -1`

Thanks.

Actually, I gave up on setting PROMPT_COMMAND as I soon realized I don't want to be seeing a jobs list before every bash prompt because it becomes cumbersome in and around simple commands that aren't "apps", so to speak, e.g. "date", "ls", etc.

So I wrote this Lua script currently called 'jobs-filter' to present "jobs" output more to my liking:

#! /usr/bin/env lua
for line in io.stdin:lines() do
  local num,x,cmd = string.match(line, '^%[(.-)%](.)%s+%S+%s-(%S.-)


)
  print('%' .. num .. x .. ' ' .. cmd)
end

then created these bash aliases:

alias f="jobs|jobs-filter"
alias j="jobs|jobs-filter"

(two, because I want to learn which I prefer over time... or maybe keep both...?)

so that, now, a simple 'f' or 'j' leads to the likes:

%1- digg  (wd: ~)
%3  usenet  (wd: ~/News)
%5+ mp
%6  weblist x
%7  gopher
%8  cl

which will help me remember I need to preface job numbers with '%' to foreground them.

> also, analog watches are the best, as is anything that
> doesn't have a processor

Sounds like *someone* needs a sun dial for their birthday....