Adds functions for managing directories
This commit is contained in:
		
							parent
							
								
									ef66ce6ff4
								
							
						
					
					
						commit
						d4ad5a153b
					
				
					 1 changed files with 15 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -6,8 +6,23 @@ function wdownload {
 | 
			
		|||
  wget -O /tmp/"$FILENAME" $URL >/dev/null && open /tmp && echo "Downloaded to: /tmp/$FILENAME" || echo "Error ..."
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# spell checker
 | 
			
		||||
function wspcheck {
 | 
			
		||||
  if [ $# -ge 1 -a -f "$1" ] && input="$1" || input="-"
 | 
			
		||||
  cat "$input" | tr '[:upper:]' '[:lower:]' | tr -cd '[:alpha:]_ \n' | tr -s ' ' '\n' | sort | comm -23 - ~/english_words.txt
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# fuzzily search through dirs stack
 | 
			
		||||
function wfd {
 | 
			
		||||
  dir=$(dirname $(fzf)) && pushd "$dir" >/dev/null
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# pushd into a directory on your dirs stack
 | 
			
		||||
function wpushd {
 | 
			
		||||
  dir=$(dirs | tr ' ' '\n' | fzf | dirname) && pushd "$dir"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue