fixed zshrc function.
This commit is contained in:
		
							parent
							
								
									e995342947
								
							
						
					
					
						commit
						12ef5236fd
					
				
					 1 changed files with 3 additions and 5 deletions
				
			
		| 
						 | 
					@ -54,18 +54,16 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          #moves a file, leaving a symlink in its place.
 | 
					          #moves a file, leaving a symlink in its place.
 | 
				
			||||||
          mvln(){
 | 
					          mvln(){
 | 
				
			||||||
            set -eu
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            # Check for correct number of arguments
 | 
					            # Check for correct number of arguments
 | 
				
			||||||
            if [ "$#" -ne 2 ]; then
 | 
					            if [ "$#" -ne 2 ]; then
 | 
				
			||||||
              echo "Usage: $0 <source> <destination>"
 | 
					              echo "Usage: $0 <source> <destination>"
 | 
				
			||||||
              exit 1
 | 
					              return 1
 | 
				
			||||||
            fi
 | 
					            fi
 | 
				
			||||||
            source="$1" destination="$2"
 | 
					            source="$1" destination="$2"
 | 
				
			||||||
            Check if source exists
 | 
					            # Check if source exists
 | 
				
			||||||
            if [ ! -e "$source" ]; then
 | 
					            if [ ! -e "$source" ]; then
 | 
				
			||||||
              echo "$source does not exist."
 | 
					              echo "$source does not exist."
 | 
				
			||||||
              exit 1
 | 
					              return 1
 | 
				
			||||||
            fi
 | 
					            fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            mv -- "$source" "$destination"
 | 
					            mv -- "$source" "$destination"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue