Heres a good response on SO: https://unix.stackexchange.com/questions/223432/in-zsh-how-can-i-more-quickly-disown-the-foreground-process/223433#223433
Having a global keybind to disown the foreground process is impossible: Keystrokes are received by the foreground process, not by the shell. You need to first suspend it with Ctrl+z if you want to disown it.
However, turns out there’s a zsh option to speed up disowning then continuing: With
setopt AUTO_CONTINUE
,disown
will automatically also send SIGCONT.
So you can get it down to
C-z
disown
.
you have a really simple use-case, so you probably don’t need and argument parsing lib, which I would normally recommend…
You can just iterate through the arguments array and categorize them by type, then add them to the appropriate collection to be handled later.
Something like this:
ids = []
urls = []
csvs = []
for arg in sys.argv:
if arg.startswith('http'):
urls.push(arg)
else if arg.endswith('.csv'):
csvs.push(arg)
else:
ids.push(arg)
Most screenshot tools allow you to pass a name as an argument, so you could make a shell script to generate the name you want then call the screenshotting tool with the appropriate name. Also, consider using flameshot
I would just ask it in the js & webdev community =]