Opened 9 years ago

Closed 8 years ago

#160 closed enhancement (wontfix)

Nginx -V Output Format

Reported by: Nginxuser Owned by: somebody
Priority: minor Milestone:
Component: nginx-core Version: 1.2.x
Keywords: usability Cc:
uname -a: NA
nginx -V: NA

Description

OK, This is not exactly the most critical thing in the scheme of things but it would be nice if some formatting could be applied to the output of the nginx -V command.

What I am thinking of is a new line before every " --" in the configure arguments string.

This will give the far more readable ...

[user@server]# nginx -V
nginx version: nginx/1.2.0
built by gcc 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) 
TLS SNI support enabled
configure arguments: 
 --user=nginx 
 --group=apache 
 --prefix=/usr/share/nginx 
 --sbin-path=/usr/sbin/nginx 
 --conf-path=/etc/nginx/nginx.conf 
 --error-log-path=/var/log/nginx/error.log 
 --http-log-path=/var/log/nginx/access.log 
 --http-client-body-temp-path=/var/lib/nginx/tmp/client_body 
 --http-proxy-temp-path=/var/lib/nginx/tmp/proxy
 --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi
 --pid-path=/var/run/nginx.pid
 --lock-path=/var/lock/subsys/nginx
 --with-debug
 --with-http_sub_module
 --with-http_ssl_module
 --with-http_perl_module
 --with-http_stub_status_module
 --without-http_ssi_module
 --without-http_scgi_module
 --without-http_uwsgi_module
 --without-http_userid_module
 --without-http_memcached_module
 --without-http_split_clients_module
 --without-http_upstream_ip_hash_module
 --add-module=/home/build/rpmbuild/BUILD/nginx-1.2.0/ngx_cache_purge-1.5
 --add-module=/home/build/rpmbuild/BUILD/nginx-1.2.0/ngx-devel-kit-0.2.17-4
 --add-module=/home/build/rpmbuild/BUILD/nginx-1.2.0/ngx_auth_request-module
 --add-module=/home/build/rpmbuild/BUILD/nginx-1.2.0/ngx-echo-module-0.38rc1-0
 --add-module=/home/build/rpmbuild/BUILD/nginx-1.2.0/ngx-lua-module-0.5.0rc24-0
 --add-module=/home/build/rpmbuild/BUILD/nginx-1.2.0/ngx-headers-more-0.17rc1
 --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
 --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables'

as compared to the current ...

[user@server]# nginx -V
nginx version: nginx/1.2.0
built by gcc 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) 
TLS SNI support enabled
configure arguments: --user=nginx --group=apache --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --with-debug --with-http_sub_module --with-http_ssl_module --with-http_perl_module --with-http_stub_status_module --without-http_ssi_module --without-http_scgi_module --without-http_uwsgi_module --without-http_userid_module --without-http_memcached_module --without-http_split_clients_module --without-http_upstream_ip_hash_module --add-module=/home/build/rpmbuild/BUILD/nginx-1.2.0/ngx_cache_purge-1.5 --add-module=/home/build/rpmbuild/BUILD/nginx-1.2.0/ngx-devel-kit-0.2.17-4 --add-module=/home/build/rpmbuild/BUILD/nginx-1.2.0/ngx_auth_request-module --add-module=/home/build/rpmbuild/BUILD/nginx-1.2.0/ngx-echo-module-0.38rc1-0 --add-module=/home/build/rpmbuild/BUILD/nginx-1.2.0/ngx-lua-module-0.5.0rc24-0 --add-module=/home/build/rpmbuild/BUILD/nginx-1.2.0/ngx-headers-more-0.17rc1 --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables'

When the current output is wrapped in the terminal window, it become basically unreadable.

Minor I know but little things make all the difference ... don't they?

Change History (3)

comment:1 by Maxim Dounin, 8 years ago

Resolution: wontfix
Status: newclosed

There is actually a major difference: current format is usable for copy-n-paste to a command line, while suggested one isn't.

comment:2 by Nginxuser, 8 years ago

Resolution: wontfix
Status: closedreopened

Hello!

Both worlds of readability and allowing for copy pasting can be maintained if the newline character is escaped to give:

[user@server]# nginx -V
nginx version: nginx/1.2.0
built by gcc 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) 
TLS SNI support enabled
configure arguments: 
 --user=nginx \
 --group=apache \
 --prefix=/usr/share/nginx \
 --sbin-path=/usr/sbin/nginx \
 --conf-path=/etc/nginx/nginx.conf \
 --error-log-path=/var/log/nginx/error.log \
 --http-log-path=/var/log/nginx/access.log \
 --http-client-body-temp-path=/var/lib/nginx/tmp/client_body \
 --http-proxy-temp-path=/var/lib/nginx/tmp/proxy \
 --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi \
 --pid-path=/var/run/nginx.pid \
 --lock-path=/var/lock/subsys/nginx \
 --with-debug \
 --with-http_sub_module \
 --with-http_ssl_module \
 --with-http_perl_module \
 --with-http_stub_status_module \
 --without-http_ssi_module \
 --without-http_scgi_module \
 --without-http_uwsgi_module \
 --without-http_userid_module \
 --without-http_memcached_module \
 --without-http_split_clients_module \
 --without-http_upstream_ip_hash_module \
 --add-module=/home/build/rpmbuild/BUILD/nginx-1.2.0/ngx_cache_purge-1.5 \
 --add-module=/home/build/rpmbuild/BUILD/nginx-1.2.0/ngx-devel-kit-0.2.17-4 \
 --add-module=/home/build/rpmbuild/BUILD/nginx-1.2.0/ngx_auth_request-module \
 --add-module=/home/build/rpmbuild/BUILD/nginx-1.2.0/ngx-echo-module-0.38rc1-0 \
 --add-module=/home/build/rpmbuild/BUILD/nginx-1.2.0/ngx-lua-module-0.5.0rc24-0 \
 --add-module=/home/build/rpmbuild/BUILD/nginx-1.2.0/ngx-headers-more-0.17rc1 \
 --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector \
 --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables'

Just a thought.

comment:3 by Maxim Dounin, 8 years ago

Resolution: wontfix
Status: reopenedclosed

Not really, as this e.g. won't work at on Windows, and won't really allow editing after copy-n-paste even with unix shells.

Note: See TracTickets for help on using tickets.