gitaction(1)
π gitaction β the manual page, but make it cute
okay bestie, welcome to gitaction(1) from the General Commands Manual β GNU Interactive Tools' little per-file-type action script that just gets you π«Ά
β¨ NAME β¨
gitaction β GNU Interactive Tools β per file type action script πΈ
π SYNTAX π
gitaction directory file
.gitaction directory file
π DESCRIPTION π
gitaction is a script that runs a different action for each file type you specify. It's called by the gitfm program when you press F2 or ^Xa β and yeah, that's the gnuitrc.TERM configuration files from the gnuit manual, iykyk πβ¨
So here's the deal with the two args:
- the first parameter is the current directory name
- the second parameter is the file name that gets matched against the default patterns
The matching is done using the shell case statement. no cap π
Now the fun part, the ~vibes~ π :
- press F2 or ^Xa on a
*.htmlfile βgitfminvokes a browser to view it π - press F2 or ^Xa on a
*.tar.gzfile βgitfmlists the tar archive contents π¦ - press those same keys on a
*.gzfile βgitfmdisplays its uncompressed contents on the screen π
...and etc, etc, the list goes on forever fr fr.
If you press F2 or ^Xa on a *.gif file or a *.jpg file and you have the zgv utility installed, you will be able to see it πΌοΈβ¨ And if you wanna change the gif/jpeg viewer? literally all you gotta do is change its name in the gitaction script. that's it. iconic.
There are many more file types and viewers that gitaction knows about. main character energy honestly. In addition:
- if you're running under GNOME,
gnome-openis used - on MacOS,
open(1)is used see(1)andmetamail(1)are also used as fallbacks π§
If all else fails, the file is displayed using $GNUIT_PAGER. Feel free to change this π And if you wanna find out what the default action for each file type is (or if you wanna modify it), just read/modify the gitaction script. It's giving open source, bestie.
The script can be easily enhanced. Just read it. π
π¦ the .gitaction local version π¦
The .gitaction script is a local version of the gitaction script. Here's how it goes:
When started, gitaction tries to search a script called .gitaction in the current directory and, if it finds it, it starts it. Then β if .gitaction's exit code is 0 (meaning .gitaction couldn't find a matching pattern), gitaction starts its own case statement trying to match the current file name (the second parameter) against its default patterns π
β οΈ The .gitaction script *must* be executable. Not optional. Periodt.
An example of .gitaction can be found in the directory gitfm is installed into (usually /usr/local/bin or /usr/bin). Debian users can find it in /usr/share/doc/gnuit/examples/ π You should copy the example to the current directory or your home directory and then modify it.
π BUGS π
Please send bug reports to:
gnuit-dev@gnu.org
(not me being emotionally devastated by a bug report π)
π₯ SEE ALSO π₯
gitfm(1) gitps(1) gitview(1) gitmount(1) gitkeys(1) gitrgrep(1) gitunpack(1)
β AUTHORS β
- Tudor Hulubei
<tudor@cs.unh.edu> - Andrei Pitis
<pink@pub.ro> - Ian Beckwith
<ianb@erislabs.net>(current maintainer). π
okay that's the whole page, you ate it π
β¨ this was gitaction(1) from the General Commands Manual β mwah, go press F2 on something and live your truth ππ¦
π¦ where this page comes from
- debian bookworm: gnuit 4.9.5-5 Β· GPL-3.0-or-later
- debian trixie: gnuit 4.9.5-5 Β· GPL-3.0-or-later
- ubuntu jammy: gnuit 4.9.5-3build3
- ubuntu noble: gnuit 4.9.5-5 Β· GPL-3.0-or-later
- ubuntu questing: gnuit 4.9.5-5
- ubuntu resolute: gnuit 4.9.5-5.1 Β· GPL-3.0-or-later
- ubuntu stonking: gnuit 4.9.5-5.1 Β· GPL-3.0-or-later
- Copyright 1993-1999, 2006-2007 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms