Petro Gromovo
Petro Gromovo

Reputation: 2171

make git command with params

if there is a way in console of kubuntu 18 to set command with current datetime and current directory, like :

git commit -m "CurrentDir project update on CurrentDatetime "

? Thanks!

Upvotes: 1

Views: 41

Answers (1)

Romain Valeri
Romain Valeri

Reputation: 21908

You could do it with sub-commands, like

git commit -m "$(pwd) project update on $(date)"

$(...) executes the contents beforehand and uses the result here
pwd outputs current dir
date outputs current date/time

Upvotes: 2

Related Questions