Hacker News new | past | comments | ask | show | jobs | submit login

I also like typing `!:` (in zsh) and hitting tab and getting some helpful hints:

    $ !:
    &  -- repeat substitution
    A  -- as ':a', then resolve symlinks
    P  -- realpath, resolve '..' physically
    Q  -- strip quotes
    a  -- absolute path, resolve '..' lexically
    c  -- PATH search for command
    e  -- leave only extension
    g  -- globally apply s or &
    h  -- head - strip trailing path element
    l  -- lower case all words
    p  -- print without executing
    q  -- quote to escape further substitutions
    r  -- root - strip suffix
    s  -- substitute string
    t  -- tail - strip directories
    u  -- upper case all words
    x  -- quote words, breaking on whitespace



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: