Update meteo function
This commit is contained in:
		
							parent
							
								
									2649735362
								
							
						
					
					
						commit
						c492d0a718
					
				
							
								
								
									
										10
									
								
								zshrc
								
								
								
								
							
							
						
						
									
										10
									
								
								zshrc
								
								
								
								
							|  | @ -1101,7 +1101,15 @@ function debcplay() { | ||||||
| # }}} | # }}} | ||||||
| # Web apps {{{ | # Web apps {{{ | ||||||
| # Get weather | # Get weather | ||||||
| alias meteo="curl http://fr.wttr.in/" | function meteo { | ||||||
|  | 	if command -v curl > /dev/null; then | ||||||
|  | 		curl http://fr.wttr.in/${*} | ||||||
|  | 	elif command -v wget > /dev/null; then | ||||||
|  | 		wget -qO- http://wttr.in/${*} | ||||||
|  | 	else | ||||||
|  | 		printf '%b' "Please ${REDB}install one of this tools :${RESET} curl or wget.\n" | ||||||
|  | 	fi | ||||||
|  | } | ||||||
| # }}} | # }}} | ||||||
| 
 | 
 | ||||||
| ####################################### | ####################################### | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue