Fix edit script
This commit is contained in:
		
							parent
							
								
									9a0276e495
								
							
						
					
					
						commit
						0eed077cc2
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -2,7 +2,7 @@
 | 
			
		|||
 | 
			
		||||
set -e
 | 
			
		||||
 | 
			
		||||
edit_dir_base="$XDG_RUNTIME_DIR/edit/"
 | 
			
		||||
edit_dir_base="$XDG_RUNTIME_DIR/edit"
 | 
			
		||||
 | 
			
		||||
_pre_checks() {
 | 
			
		||||
	if [ -z "$EDITOR" ]; then
 | 
			
		||||
| 
						 | 
				
			
			@ -30,7 +30,7 @@ _get_edit_directory() {
 | 
			
		|||
	target_dir=$(dirname "$1")
 | 
			
		||||
	edit_dir_sub=$(_readlink "$target_dir" | md5sum | awk '{ print $1 }')
 | 
			
		||||
 | 
			
		||||
	edit_directory="$edit_dir_base/$edit_dir_sub/"
 | 
			
		||||
	edit_directory="$edit_dir_base/$edit_dir_sub"
 | 
			
		||||
	echo "$edit_directory"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -39,7 +39,7 @@ _get_edit_file() {
 | 
			
		|||
	target_name=$(basename "$target")
 | 
			
		||||
	edit_directory=$(_get_edit_directory "$target")
 | 
			
		||||
 | 
			
		||||
	edit_file=$(realpath -s "$edit_directory/$target_name")
 | 
			
		||||
	edit_file="$edit_directory/$target_name"
 | 
			
		||||
	echo "$edit_file"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue