· 👁 5 · 1338

· 👁 5 · 1337

· 👁 9 · 1336

· 👁 9 · 1335

I use #bash history Ctrl-R a lot, also with #fzf and other helpers, and have bash aliases, that are just one letter, and I do not want to pollute my bash #history with it, so I found the solution - the bash function/alias that delete itself from the history, for example:

s() {
       git status

       history -d "$(history 1 | awk '{print $1}')"
       # delete from history
}

· 👁 9 · 1334

#bash

I love #cli, scripts, and sometimes I want my script to accept an argument that is the same as the folder name. How to pass that current folder name to the script?

upload.py file.pdf --category "${PWD##*/}"

Yep, it works.

· 👁 11 · 1333

· 👁 10 · 1332

· 👁 9 · 1331

· 👁 9 · 1330

· 👁 10 · 1328

· 👁 10 · 1319

· 👁 6 · 1309

· 👁 10 · 1308

· 👁 16 · 1307

· 👁 16 · 1306

· 👁 15 · 1299

· 👁 15 · 1298

· 👁 16 · 1294

· 👁 12 · 1292

· 👁 13 · 1285