DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 8th December 2016
attilio attilio is offline
Port Guard
 
Join Date: Jun 2015
Posts: 43
Default flags in vi's man page

Good evening.
Reading vi's man page of 5.9 release I'm not able to find the possible values of flags in some vi/ex commands.
For example, the ex s[ubstitute] command has the form

[range] s[ubstitute] [/pattern/replace/] *[options] [count] [flags]

In Internet I found some esamples and the possible values "g", for "global", and
perhaps "c" (I'm not shure) for "confirm".

Is there a list of all possible values in any man page?
Thanks in advance.
Attilio
Reply With Quote
  #2   (View Single Post)  
Old 8th December 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 8,020
Default

The man page states that it isn't a complete Nvi reference.

There was a Vi reference document in section 13 of the Unix User's Supplemental Documents (USD) collection, which various Unix systems included (under /usr/share, typically). This reference was never included with OpenBSD.

That said, the Nvi source tree came from NetBSD, and the reference document still exists in the OpenBSD CVS repository from that initial import 21 years ago.

---

To my knowledge, the flags are g: global, c: confirm, and i: ignore
Reply With Quote
  #3   (View Single Post)  
Old 8th December 2016
attilio attilio is offline
Port Guard
 
Join Date: Jun 2015
Posts: 43
Default

Thank you jggimi, your answers are always ready.
Reply With Quote
  #4   (View Single Post)  
Old 10th December 2016
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin Tournoij
Tcpdump Spy
 
Join Date: Apr 2008
Location: Ireland
Posts: 2,245
Default

Vim isn't (n)vi, but its documentation does record vi compatibility reasonably complete. From :help s_flags. All the flags that aren't marked as "not in Vi" are:

Code:
[c] Confirm each substitution.
[g] Replace all occurrences in the line. 
[n] Report the number of matches, do not actually substitute. 
[p] Print the line containing the last substitute.
[#] Like [p] and prepend the line number.
[l] Like [p] but print the text like :list.
I would expect these to work in nvi as described.
Reply With Quote
  #5   (View Single Post)  
Old 13th December 2016
attilio attilio is offline
Port Guard
 
Join Date: Jun 2015
Posts: 43
Default

Thank you Carpetsmoker and excuse me for my late answer;
I don't log very often.
I will try as soon as possible.
Have a nice day.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
fresh install require file flags schg assigned to dir or files? dbach OpenBSD Security 4 1st May 2012 05:50 PM
Firefox page too big wokko NetBSD Package System (pkgsrc) 5 1st June 2010 04:18 PM
Firefox 3.5.5 FAILS with pf v4.6 and "flags S/FSRA" s2scott OpenBSD Security 0 16th November 2009 10:03 PM
First time page / Start page bichumo General software and network 7 27th October 2008 10:40 PM
Man Page Numbers JMJ_coder Off-Topic 5 22nd May 2008 04:51 AM


All times are GMT. The time now is 03:37 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick