add -c and --clip option to tail - #14
Open
caillouc wants to merge 1 commit into
Open
Conversation
ahippo
reviewed
Apr 26, 2022
Closed
ahippo
reviewed
Apr 26, 2022
There was a problem hiding this comment.
Oh, shellcheck also complains quite a bit:
(which can be fixed by basically wrapping up the whole thing into a function like cmd_tail()
$ make lint
shellcheck -s bash src/tail.bash
In src/tail.bash line 3:
local opts clip=0
^---^ SC2168: 'local' is only valid in functions.
In src/tail.bash line 5:
local err=$?
^---^ SC2168: 'local' is only valid in functions.
In src/tail.bash line 14:
local pass
^---^ SC2168: 'local' is only valid in functions.
In src/tail.bash line 15:
local path="$1"
^---^ SC2168: 'local' is only valid in functions.
In src/tail.bash line 16:
local passfile="$PREFIX/$path.gpg"
^---^ SC2168: 'local' is only valid in functions.
In src/tail.bash line 23:
local cpy="$(echo "$pass" | $BASE64 -d | head -n 1)"
^---^ SC2168: 'local' is only valid in functions.
^-^ SC2155: Declare and assign separately to avoid masking return values.
For more information:
https://www.shellcheck.net/wiki/SC2168 -- 'local' is only valid in functions.
https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ...
make: *** [Makefile:37: lint] Error 1
Owner
|
This looks great. Thanks Could you please make a note in the readme to explain the Also please add this to the completion. Finally please rebase on master and squash the commit so that the PR only consists of one commit. Also thanks to @ahippo for the review! |
ahippo
reviewed
Apr 28, 2022
Sure, you're welcome! |
|
Looks good to me! |
Author
|
Don't hesitate to tell me if you need me to add anything |
|
@palortoff Good to merge? |
|
@palortoff , any help needed in merging the PR? |
Author
|
@palortoff I think the pull request is ready for a merge now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the possibility to copy the first line of the file and display only the tail of the file.
tail would support -c and --clip option