Closed MarcCoquand closed 8 months ago
Reading the docs more thoroughly, I was able to figure out how it is done!
Very straight forward
bind tree C >sh -c "echo 'Enter file name:'; read line; touch %(directory)/$line"
The >
exits tig and reopens it upon completion.
Heya!
I'm trying to add a command to allow creating a new file, mv files etc. directly from the tree view.
The approach I wanted to take was to use
read
, so I could create a command like:!read | xargs -I {} touch %(folder)/{}
, however it seems that the read command does not work with tig, as it does not accept any input.Would it be possible to support it? Then we could add all kinds of custom commands, it'd be incredible.
Maybe I am doing something wrong, and it is supported (afterall it can open an editor where I can give input).