Skip to content

Commit

Permalink
[modify-] clarify prompt for add-rows
Browse files Browse the repository at this point in the history
  • Loading branch information
midichef committed Jun 28, 2024
1 parent d4159b6 commit 0f0a594
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion visidata/modify.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def new_rows(sheet, n):
return [sheet.newRow() for i in range(n)]

Sheet.addCommand('a', 'add-row', 'addRows([newRow()], index=cursorRowIndex); cursorDown(1)', 'append a blank row')
Sheet.addCommand('ga', 'add-rows', 'n=int(input("add rows: ", value=1)); addRows(new_rows(n), index=cursorRowIndex); cursorDown(1)', 'append N blank rows')
Sheet.addCommand('ga', 'add-rows', 'n=int(input("add how many rows: ", value=1)); addRows(new_rows(n), index=cursorRowIndex); cursorDown(1)', 'append N blank rows')
Sheet.addCommand('za', 'addcol-new', 'addColumnAtCursor(SettableColumn(input("column name: ")))', 'append an empty column')
Sheet.addCommand('gza', 'addcol-bulk', 'addColumnAtCursor(*(SettableColumn() for c in range(int(input("add columns: ")))))', 'append N empty columns')

Expand Down

0 comments on commit 0f0a594

Please sign in to comment.