• Posts
  • RSS
  • ◂◂RSS
  • Contact

  • Bash quibbles

    January 23rd, 2009
    programming, shell, tech
    I like bash. It does a lot of things well and makes my life on the command line a lot more pleasant. It generally has nice tab completion, but there are some ways it would work better, though:
    1. Tab completion on paths containing environment variables should not expand them. Or if it is going to expand them, it should not follow with a space. If I'm doing everything relative to the directory $ON_B then I don't care that it expands to /nfs/man/this/path/is/freakin/long/on_b. With my shell PS1 hack (below) I don't have to see this depth all the time, but it could be even better.
    2. Tab completion should understand filename wildcards. If I have 'ls $ON_B/{a,b}*/repor and press tab then I want to have the command replaced by ls $ON_B/{a,b}*/report/. The logic is a little tricky. And there's even a bit of ambiguity: if the directory reporting appears in one (or more) of the possible expansions but not in all of them, while the directory report appears in all, do we ignore reporting? This affects whether we append the trailing slash in this case, and has widespread effects in other cases. I'm inclined to have it complete only with things that exist in all matches. Note that with this completion rule, to get something that exists in some of the matches, you need to edit the path being completed to rule out the things that don't have it. So while I wouldn't complete reporting from ls $ON_B/{a,b}*/repor if any of the dirs didn't have reporting, I would complete it from ls $ON_B/{a,b}*/reporti.

    On a completely different subject, I've started using the InvertColors Firefox addon, and it makes pages look a lot nicer.

    Comment via: facebook

    Recent posts on blogs I like:

    Interview with Kat Woods: decision-making about having kids

    Realizing what you don't want The post Interview with Kat Woods: decision-making about having kids appeared first on Otherwise.

    via Otherwise July 5, 2022

    Decision theory and dynamic inconsistency

    Here is my current take on decision theory: When making a decision after observing X, we should condition (or causally intervene) on statements like “My decision algorithm outputs Y after observing X.” Updating seems like a description of something you do…

    via The sideways view July 3, 2022

    10x (engineer, context) pairs

    Your actual output depends on a lot more than just how quickly you finish a given programming task. Everything besides the literal coding depends deeply on the way you interact with the organization around you.

    via benkuhn.net June 9, 2022

    more     (via openring)


  • Posts
  • RSS
  • ◂◂RSS
  • Contact