mirror of
				https://github.com/tmux-plugins/tmux-resurrect.git
				synced 2025-11-04 08:56:03 +00:00 
			
		
		
		
	Always use 'ps -ao' to detect commands
Previously we used 'ps -eo' for some operating systems. It turns out flags '-ao' work fine for all, and it should also be fine per posix spec http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ps.html#tag_20_96
This commit is contained in:
		@@ -10,16 +10,8 @@ exit_safely_if_empty_ppid() {
 | 
			
		||||
	fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ps_command_flags() {
 | 
			
		||||
	case $(uname -s) in
 | 
			
		||||
		FreeBSD) echo "-ao" ;;
 | 
			
		||||
		OpenBSD) echo "-ao" ;;
 | 
			
		||||
		*) echo "-eo" ;;
 | 
			
		||||
	esac
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
full_command() {
 | 
			
		||||
	ps "$(ps_command_flags)" "ppid command" |
 | 
			
		||||
	ps -ao "ppid command" |
 | 
			
		||||
		sed "s/^ *//" |
 | 
			
		||||
		grep "^${PANE_PID}" |
 | 
			
		||||
		cut -d' ' -f2-
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user