mirror of
				https://github.com/tiyn/dotfiles.git
				synced 2025-10-31 04:21:15 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			362 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			362 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/env sh
 | |
| 
 | |
| # Clears the files created for previewing markdown files in nvim
 | |
| # based on a program by lukesmithxyz
 | |
| 
 | |
| case "$1" in
 | |
| 	*.md)
 | |
| 	file=$(readlink -f "$1")
 | |
| 	dir=$(dirname "$file")
 | |
| 	base="${file%.*}"
 | |
|         find "$dir"  -maxdepth 1 -type f -regextype gnu-awk -regex "^$base\\.(html|pdf)" -delete ;;
 | |
| 	*) printf "Give .md file as argument.\\n" ;;
 | |
| esac
 |